Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(557)

Delta Between Two Patch Sets: Src/GoogleApis.Auth/OAuth2/Flows/GoogleAuthorizationCodeFlow.cs

Issue 94340043: Issue 463: Provide a signout\logout method (Closed) Base URL: https://google-api-dotnet-client.googlecode.com/hg/
Left Patch Set: minor II Created 9 years, 10 months ago
Right Patch Set: Gus' comments Created 9 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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
(...skipping 14 matching lines...) Expand all
25 25
26 namespace Google.Apis.Auth.OAuth2.Flows 26 namespace Google.Apis.Auth.OAuth2.Flows
27 { 27 {
28 /// <summary> 28 /// <summary>
29 /// Google specific authorization code flow which inherits from <seealso cre f="AuthorizationCodeFlow"/>. 29 /// Google specific authorization code flow which inherits from <seealso cre f="AuthorizationCodeFlow"/>.
30 /// </summary> 30 /// </summary>
31 public class GoogleAuthorizationCodeFlow : AuthorizationCodeFlow 31 public class GoogleAuthorizationCodeFlow : AuthorizationCodeFlow
32 { 32 {
33 private readonly string revokeTokenUrl; 33 private readonly string revokeTokenUrl;
34 34
35 /// <summary>Gets the revoke token URL.</summary> 35 /// <summary>Gets the token revocation URL.</summary>
36 public string RevokeTokenUrl { get { return revokeTokenUrl; } } 36 public string RevokeTokenUrl { get { return revokeTokenUrl; } }
37 37
38 /// <summary>Constructs a new Google authorization code flow.</summary> 38 /// <summary>Constructs a new Google authorization code flow.</summary>
39 public GoogleAuthorizationCodeFlow(Initializer initializer) 39 public GoogleAuthorizationCodeFlow(Initializer initializer)
40 : base(initializer) 40 : base(initializer)
41 { 41 {
42 revokeTokenUrl = initializer.RevokeTokenUrl; 42 revokeTokenUrl = initializer.RevokeTokenUrl;
43 } 43 }
44 44
45 public override AuthorizationCodeRequestUrl CreateAuthorizationCodeReque st(string redirectUri) 45 public override AuthorizationCodeRequestUrl CreateAuthorizationCodeReque st(string redirectUri)
(...skipping 22 matching lines...) Expand all
68 var error = NewtonsoftJsonSerializer.Instance.Deserialize<TokenE rrorResponse>(content); 68 var error = NewtonsoftJsonSerializer.Instance.Deserialize<TokenE rrorResponse>(content);
69 throw new TokenResponseException(error); 69 throw new TokenResponseException(error);
70 } 70 }
71 71
72 await DeleteTokenAsync(userId, taskCancellationToken); 72 await DeleteTokenAsync(userId, taskCancellationToken);
73 } 73 }
74 74
75 /// <summary>An initializer class for Google authorization code flow. </ summary> 75 /// <summary>An initializer class for Google authorization code flow. </ summary>
76 public new class Initializer : AuthorizationCodeFlow.Initializer 76 public new class Initializer : AuthorizationCodeFlow.Initializer
77 { 77 {
78 /// <summary>Gets or sets the revoke token URL.</summary> 78 /// <summary>Gets or sets the token revocation URL.</summary>
79 public string RevokeTokenUrl { get; set; } 79 public string RevokeTokenUrl { get; set; }
80 80
81 /// <summary> 81 /// <summary>
82 /// Constructs a new initializer. Sets Authorization server URL to· 82 /// Constructs a new initializer. Sets Authorization server URL to·
83 /// <seealso cref="GoogleAuthConsts.AuthorizationUrl"/>, and Token s erver URL to· 83 /// <seealso cref="GoogleAuthConsts.AuthorizationUrl"/>, and Token s erver URL to·
84 /// <seealso cref="GoogleAuthConsts.TokenUrl"/>. 84 /// <seealso cref="GoogleAuthConsts.TokenUrl"/>.
85 /// </summary> 85 /// </summary>
86 public Initializer() 86 public Initializer()
87 : base(GoogleAuthConsts.AuthorizationUrl, GoogleAuthConsts.Token Url) 87 : base(GoogleAuthConsts.AuthorizationUrl, GoogleAuthConsts.Token Url)
88 { 88 {
89 RevokeTokenUrl = GoogleAuthConsts.RevokeTokenUrl; 89 RevokeTokenUrl = GoogleAuthConsts.RevokeTokenUrl;
90 } 90 }
91 } 91 }
92 } 92 }
93 } 93 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b