LEFT | RIGHT |
1 /* | 1 /* |
2 Copyright 2013 Google Inc | 2 Copyright 2013 Google Inc |
3 | 3 |
4 Licensed under the Apache License, Version 2.0 (the "License"); | 4 Licensed under the Apache License, Version 2.0 (the "License"); |
5 you may not use this file except in compliance with the License. | 5 you may not use this file except in compliance with the License. |
6 You may obtain a copy of the License at | 6 You may obtain a copy of the License at |
7 | 7 |
8 http://www.apache.org/licenses/LICENSE-2.0 | 8 http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 |
10 Unless required by applicable law or agreed to in writing, software | 10 Unless required by applicable law or agreed to in writing, software |
11 distributed under the License is distributed on an "AS IS" BASIS, | 11 distributed under the License is distributed on an "AS IS" BASIS, |
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 See the License for the specific language governing permissions and | 13 See the License for the specific language governing permissions and |
14 limitations under the License. | 14 limitations under the License. |
15 */ | 15 */ |
16 | 16 |
17 using System; | 17 using System; |
18 using System.Collections.Generic; | 18 using System.Collections.Generic; |
19 using System.IO; | 19 using System.IO; |
20 | 20 |
21 using Google.Apis.Json; | 21 using Google.Apis.Json; |
22 | 22 |
23 namespace Google.Apis.Auth.OAuth2 | 23 namespace Google.Apis.Auth.OAuth2 |
24 { | 24 { |
25 /// <summary> | 25 /// <summary> |
26 /// OAuth 2.0 client secrets model as specified in "https://code.google.com/
apis/console/". | 26 /// OAuth 2.0 client secrets model as specified in https://cloud.google.com/
console/. |
27 /// </summary> | 27 /// </summary> |
28 public sealed class GoogleClientSecrets | 28 public sealed class GoogleClientSecrets |
29 { | 29 { |
30 /// <summary>Gets or sets the details for installed applications.</summa
ry> | 30 /// <summary>Gets or sets the details for installed applications.</summa
ry> |
31 [Newtonsoft.Json.JsonProperty("installed")] | 31 [Newtonsoft.Json.JsonProperty("installed")] |
32 private ClientSecrets Installed { get; set; } | 32 private ClientSecrets Installed { get; set; } |
33 | 33 |
34 /// <summary>Gets or sets the details for web applications.</summary> | 34 /// <summary>Gets or sets the details for web applications.</summary> |
35 [Newtonsoft.Json.JsonProperty("web")] | 35 [Newtonsoft.Json.JsonProperty("web")] |
36 private ClientSecrets Web { get; set; } | 36 private ClientSecrets Web { get; set; } |
(...skipping 12 matching lines...) Expand all Loading... |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 /// <summary>Loads the Google client secret from the input stream.</summ
ary> | 52 /// <summary>Loads the Google client secret from the input stream.</summ
ary> |
53 public static GoogleClientSecrets Load(Stream stream) | 53 public static GoogleClientSecrets Load(Stream stream) |
54 { | 54 { |
55 return NewtonsoftJsonSerializer.Instance.Deserialize<GoogleClientSec
rets>(stream); | 55 return NewtonsoftJsonSerializer.Instance.Deserialize<GoogleClientSec
rets>(stream); |
56 } | 56 } |
57 } | 57 } |
58 } | 58 } |
LEFT | RIGHT |