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

Side by Side Diff: Src/GoogleApis.Auth/OAuth2/Flows/AuthorizationCodeFlow.cs

Issue 94340043: Issue 463: Provide a signout\logout method (Closed) Base URL: https://google-api-dotnet-client.googlecode.com/hg/
Patch Set: Gus' comments Created 10 years, 2 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:
View unified diff | Download patch
OLDNEW
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 // The new token may not contain a refresh token, so set it with the given refresh token. 257 // The new token may not contain a refresh token, so set it with the given refresh token.
258 if (token.RefreshToken == null) 258 if (token.RefreshToken == null)
259 { 259 {
260 token.RefreshToken = refreshToken; 260 token.RefreshToken = refreshToken;
261 } 261 }
262 262
263 await StoreTokenAsync(userId, token, taskCancellationToken).Configur eAwait(false); 263 await StoreTokenAsync(userId, token, taskCancellationToken).Configur eAwait(false);
264 return token; 264 return token;
265 } 265 }
266 266
267 public virtual Task RevokeTokenAsync(string userId, string token, Cancel lationToken taskCancellationToken)
268 {
269 throw new NotImplementedException("The OAuth 2.0 protocol does not s upport token revocation.");
270 }
271
267 #endregion 272 #endregion
268 273
269 /// <summary>Stores the token in the <see cref="DataStore"/>.</summary> 274 /// <summary>Stores the token in the <see cref="DataStore"/>.</summary>
270 /// <param name="userId">User identifier.</param> 275 /// <param name="userId">User identifier.</param>
271 /// <param name="token">Token to store.</param> 276 /// <param name="token">Token to store.</param>
272 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration.</param> 277 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration.</param>
273 private async Task StoreTokenAsync(string userId, TokenResponse token, C ancellationToken taskCancellationToken) 278 private async Task StoreTokenAsync(string userId, TokenResponse token, C ancellationToken taskCancellationToken)
274 { 279 {
275 taskCancellationToken.ThrowIfCancellationRequested(); 280 taskCancellationToken.ThrowIfCancellationRequested();
276 if (DataStore != null) 281 if (DataStore != null)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 316
312 public void Dispose() 317 public void Dispose()
313 { 318 {
314 if (HttpClient != null) 319 if (HttpClient != null)
315 { 320 {
316 HttpClient.Dispose(); 321 HttpClient.Dispose();
317 } 322 }
318 } 323 }
319 } 324 }
320 } 325 }
OLDNEW

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