LEFT | RIGHT |
1 /* | 1 /* |
2 Copyright 2014 Google Inc | 2 Copyright 2014 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 |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 namespace Google.Apis.Auth.OAuth2.Requests | 22 namespace Google.Apis.Auth.OAuth2.Requests |
23 { | 23 { |
24 /// <summary> | 24 /// <summary> |
25 /// Google OAuth 2.0 request to revoke an access token as specified in· | 25 /// Google OAuth 2.0 request to revoke an access token as specified in· |
26 /// https://developers.google.com/accounts/docs/OAuth2WebServer#tokenrevoke. | 26 /// https://developers.google.com/accounts/docs/OAuth2WebServer#tokenrevoke. |
27 /// </summary> | 27 /// </summary> |
28 class GoogleRevokeTokenRequest | 28 class GoogleRevokeTokenRequest |
29 { | 29 { |
30 private readonly Uri revokeTokenUrl; | 30 private readonly Uri revokeTokenUrl; |
31 /// <summary>Gets the revoke token URI.</summary> | 31 /// <summary>Gets the URI for token revocation.</summary> |
32 public Uri RevokeTokenUrl | 32 public Uri RevokeTokenUrl |
33 { | 33 { |
34 get { return revokeTokenUrl; } | 34 get { return revokeTokenUrl; } |
35 } | 35 } |
36 | 36 |
37 /// <summary>Gets or sets the token to revoke.</summary> | 37 /// <summary>Gets or sets the token to revoke.</summary> |
38 [Google.Apis.Util.RequestParameterAttribute("token")] | 38 [Google.Apis.Util.RequestParameterAttribute("token")] |
39 public string Token { get; set; } | 39 public string Token { get; set; } |
40 | 40 |
41 public GoogleRevokeTokenRequest(Uri revokeTokenUrl) | 41 public GoogleRevokeTokenRequest(Uri revokeTokenUrl) |
42 { | 42 { |
43 this.revokeTokenUrl = revokeTokenUrl; | 43 this.revokeTokenUrl = revokeTokenUrl; |
44 } | 44 } |
45 | 45 |
46 /// <summary>Creates a <see cref="System.Uri"/> which is used to request
the authorization code.</summary> | 46 /// <summary>Creates a <see cref="System.Uri"/> which is used to request
the authorization code.</summary> |
47 public Uri Build() | 47 public Uri Build() |
48 { | 48 { |
49 var builder = new RequestBuilder() | 49 var builder = new RequestBuilder() |
50 { | 50 { |
51 BaseUri = revokeTokenUrl | 51 BaseUri = revokeTokenUrl |
52 }; | 52 }; |
53 ParameterUtils.InitParameters(builder, this); | 53 ParameterUtils.InitParameters(builder, this); |
54 return builder.BuildUri(); | 54 return builder.BuildUri(); |
55 } | 55 } |
56 } | 56 } |
57 } | 57 } |
LEFT | RIGHT |