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

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

Issue 94340043: Issue 463: Provide a signout\logout method (Closed) Base URL: https://google-api-dotnet-client.googlecode.com/hg/
Left Patch Set: 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 19 matching lines...) Expand all
30 { 30 {
31 /// <summary>Gets the method for presenting the access token to the reso urce server.</summary> 31 /// <summary>Gets the method for presenting the access token to the reso urce server.</summary>
32 IAccessMethod AccessMethod { get; } 32 IAccessMethod AccessMethod { get; }
33 33
34 /// <summary>Gets the clock.</summary> 34 /// <summary>Gets the clock.</summary>
35 IClock Clock { get; } 35 IClock Clock { get; }
36 36
37 /// <summary>Gets the data store used to store the credentials.</summary > 37 /// <summary>Gets the data store used to store the credentials.</summary >
38 IDataStore DataStore { get; } 38 IDataStore DataStore { get; }
39 39
40 /// <summary> 40 /// <summary>Asynchronously loads the user's token using the flow's <see also cref="IDataStore"/>.</summary>
41 /// Asynchronously loads the user's token using the flow's
42 /// <see cref="Google.Apis.Util.Store.IDataStore"/>.
43 /// </summary>
44 /// <param name="userId">User identifier</param> 41 /// <param name="userId">User identifier</param>
45 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration</param> 42 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration</param>
46 /// <returns>Token response</returns> 43 /// <returns>Token response</returns>
47 Task<TokenResponse> LoadTokenAsync(string userId, CancellationToken task CancellationToken); 44 Task<TokenResponse> LoadTokenAsync(string userId, CancellationToken task CancellationToken);
48 45
49 /// <summary> 46 /// <summary>Asynchronously deletes the user's token using the flow's <s eealso cref="IDataStore"/>.</summary>
50 /// Asynchronously deletes the user's token using the flow's
51 /// <see cref="Google.Apis.Util.Store.IDataStore"/>.
52 /// </summary>
53 /// <param name="userId">User identifier.</param> 47 /// <param name="userId">User identifier.</param>
54 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration.</param> 48 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration.</param>
55 Task DeleteTokenAsync(string userId, CancellationToken taskCancellationT oken); 49 Task DeleteTokenAsync(string userId, CancellationToken taskCancellationT oken);
56 50
57 /// <summary>Creates an authorization code request with the specified re direct URI.</summary> 51 /// <summary>Creates an authorization code request with the specified re direct URI.</summary>
58 AuthorizationCodeRequestUrl CreateAuthorizationCodeRequest(string redire ctUri); 52 AuthorizationCodeRequestUrl CreateAuthorizationCodeRequest(string redire ctUri);
59 53
60 /// <summary>Asynchronously exchanges code with a token.</summary> 54 /// <summary>Asynchronously exchanges code with a token.</summary>
61 /// <param name="userId">User identifier.</param> 55 /// <param name="userId">User identifier.</param>
62 /// <param name="code">Authorization code received from the authorizatio n server.</param> 56 /// <param name="code">Authorization code received from the authorizatio n server.</param>
63 /// <param name="redirectUri">Redirect URI which is used in the token re quest.</param> 57 /// <param name="redirectUri">Redirect URI which is used in the token re quest.</param>
64 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration.</param> 58 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration.</param>
65 /// <returns>Token response which contains the access token.</returns> 59 /// <returns>Token response which contains the access token.</returns>
66 Task<TokenResponse> ExchangeCodeForTokenAsync(string userId, string code , string redirectUri, 60 Task<TokenResponse> ExchangeCodeForTokenAsync(string userId, string code , string redirectUri,
67 CancellationToken taskCancellationToken); 61 CancellationToken taskCancellationToken);
68 62
69 /// <summary>Asynchronously refreshes an access token using a refresh to ken.</summary> 63 /// <summary>Asynchronously refreshes an access token using a refresh to ken.</summary>
70 /// <param name="userId">User identifier.</param> 64 /// <param name="userId">User identifier.</param>
71 /// <param name="refreshToken">Refresh token which is used to get a new access token.</param> 65 /// <param name="refreshToken">Refresh token which is used to get a new access token.</param>
72 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration.</param> 66 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration.</param>
73 /// <returns>Token response which contains the access token and the inpu t refresh token.</returns> 67 /// <returns>Token response which contains the access token and the inpu t refresh token.</returns>
74 Task<TokenResponse> RefreshTokenAsync(string userId, string refreshToken , 68 Task<TokenResponse> RefreshTokenAsync(string userId, string refreshToken ,
75 CancellationToken taskCancellationToken); 69 CancellationToken taskCancellationToken);
76 70
77 /// <summary>Asynchronously revokes the specified access token.</summary > 71 /// <summary>
72 /// Asynchronously revokes the specified token. This method disconnects the user's account from the OAuth 2.0
73 /// application. It should be called upon removing the user account from the site.</summary>
74 /// <remarks>
75 /// If revoking the token succeeds, the user's credential is removed fro m the data store and the user MUST
76 /// authorize the application again before the application can access th e user's private resources.
77 /// </remarks>
78 /// <param name="userId">User identifier.</param> 78 /// <param name="userId">User identifier.</param>
79 /// <param name="token">Access token to be revoked.</param> 79 /// <param name="token">Access token to be revoked.</param>
80 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration.</param> 80 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration.</param>
81 /// <returns><c>true</c> if the token was revoked successfully.</returns >········ 81 /// <returns><c>true</c> if the token was revoked successfully.</returns >········
82 Task RevokeTokenAsync(string userId, string token, CancellationToken tas kCancellationToken); 82 Task RevokeTokenAsync(string userId, string token, CancellationToken tas kCancellationToken);
83 } 83 }
84 } 84 }
LEFTRIGHT

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