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

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

Issue 13972043: Issue 351: Reimplement OAuth2 (Step 3 - Tests, Flows and Credential) (Closed) Base URL: https://google-api-dotnet-client.googlecode.com/hg/
Left Patch Set: Jon Skeet review Created 10 years, 10 months ago
Right Patch Set: minor Created 10 years, 9 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>Loads the user's token using the flow's <seealso cref="IDat aStore"/>.</summary> 40 /// <summary>Asynchronously loads the user's token using the flow's <see also cref="IDataStore"/>.</summary>
41 /// <param name="userId">User identifier</param> 41 /// <param name="userId">User identifier</param>
42 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration</param> 42 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration</param>
43 /// <returns>Token response</returns> 43 /// <returns>Token response</returns>
44 Task<TokenResponse> LoadTokenAsync(string userId, CancellationToken task CancellationToken); 44 Task<TokenResponse> LoadTokenAsync(string userId, CancellationToken task CancellationToken);
45 45
46 /// <summary>Deletes the user's token using the flow's <seealso cref="ID ataStore"/>.</summary> 46 /// <summary>Asynchronously deletes the user's token using the flow's <s eealso cref="IDataStore"/>.</summary>
47 /// <param name="userId">User identifier</param> 47 /// <param name="userId">User identifier</param>
48 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration</param> 48 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration</param>
49 Task DeleteTokenAsync(string userId, CancellationToken taskCancellationT oken); 49 Task DeleteTokenAsync(string userId, CancellationToken taskCancellationT oken);
50 50
51 /// <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>
52 AuthorizationCodeRequestUrl CreateAuthorizationCodeRequest(string redire ctUri); 52 AuthorizationCodeRequestUrl CreateAuthorizationCodeRequest(string redire ctUri);
53 53
54 /// <summary>Exchanges code with a token.</summary> 54 /// <summary>Asynchronously exchanges code with a token.</summary>
55 /// <param name="userId">User identifier</param> 55 /// <param name="userId">User identifier</param>
56 /// <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>
57 /// <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>
58 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration</param> 58 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration</param>
59 /// <returns>Token response which contains the access token</returns> 59 /// <returns>Token response which contains the access token</returns>
60 Task<TokenResponse> ExchangeCodeForTokenAsync(string userId, string code , string redirectUri, 60 Task<TokenResponse> ExchangeCodeForTokenAsync(string userId, string code , string redirectUri,
61 CancellationToken taskCancellationToken); 61 CancellationToken taskCancellationToken);
62 62
63 /// <summary>Refreshes an access token using a refresh token.</summary> 63 /// <summary>Asynchronously refreshes an access token using a refresh to ken.</summary>
64 /// <param name="userId">User identifier</param> 64 /// <param name="userId">User identifier</param>
65 /// <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>
66 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration</param> 66 /// <param name="taskCancellationToken">Cancellation token to cancel ope ration</param>
67 /// <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>
68 Task<TokenResponse> RefreshTokenAsync(string userId, string refreshToken , CancellationToken taskCancellationToken); 68 Task<TokenResponse> RefreshTokenAsync(string userId, string refreshToken ,
69 CancellationToken taskCancellationToken);
69 } 70 }
70 } 71 }
LEFTRIGHT

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