[go: nahoru, domu]

Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(72)
Delta Between Two Patch Sets: Src/GoogleApis.Auth.WP/OAuth2/AuthorizationCodeWPInstalledApp.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 10 years, 1 month ago
Right Patch Set: Gus' comments Created 10 years, 1 month 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 20 matching lines...) Expand all
31 /// <remarks> 31 /// <remarks>
32 /// The <see cref="AuthorizeAsync"/> method MUST be called from the dispatch er thread! 32 /// The <see cref="AuthorizeAsync"/> method MUST be called from the dispatch er thread!
33 /// This installed app class uses an internal <seealso cref="AuthorizationCo deInstalledApp"/> with a 33 /// This installed app class uses an internal <seealso cref="AuthorizationCo deInstalledApp"/> with a
34 /// <seealso cref="Google.Apis.Auth.OAuth2.AuthorizationCodeBroker"/> for re trieving the authorization code.· 34 /// <seealso cref="Google.Apis.Auth.OAuth2.AuthorizationCodeBroker"/> for re trieving the authorization code.·
35 /// </remarks> 35 /// </remarks>
36 /// </summary> 36 /// </summary>
37 public sealed class AuthorizationCodeWPInstalledApp : IAuthorizationCodeInst alledApp 37 public sealed class AuthorizationCodeWPInstalledApp : IAuthorizationCodeInst alledApp
38 { 38 {
39 private readonly IAuthorizationCodeInstalledApp innerInstallApp; 39 private readonly IAuthorizationCodeInstalledApp innerInstallApp;
40 40
41 /// <summary>Constructs a new authorization code installed application f or WP.</summary> 41 /// <summary>
42 /// Constructs a new authorization code for Windows Phone targeting an i nstalled application flow.
43 /// </summary>
42 /// <param name="authorizationCodeFlowInitializer">An authorization code flow initializer.</param> 44 /// <param name="authorizationCodeFlowInitializer">An authorization code flow initializer.</param>
43 public AuthorizationCodeWPInstalledApp(AuthorizationCodeFlow.Initializer authorizationCodeFlowInitializer) 45 public AuthorizationCodeWPInstalledApp(AuthorizationCodeFlow.Initializer authorizationCodeFlowInitializer)
44 { 46 {
45 var flow = new AuthorizationCodeFlow(authorizationCodeFlowInitialize r); 47 var flow = new AuthorizationCodeFlow(authorizationCodeFlowInitialize r);
46 innerInstallApp = new AuthorizationCodeInstalledApp(flow, new Author izationCodeBroker()); 48 innerInstallApp = new AuthorizationCodeInstalledApp(flow, new Author izationCodeBroker());
47 } 49 }
48 50
49 /// <summary>Constructs a new authorization code installed application f or WP.</summary> 51 /// <summary>
52 /// Constructs a new authorization code for Windows Phone targeting an i nstalled application flow.
53 /// </summary>
50 /// <param name="flow">An authorization code flow.</param> 54 /// <param name="flow">An authorization code flow.</param>
51 public AuthorizationCodeWPInstalledApp(IAuthorizationCodeFlow flow) 55 public AuthorizationCodeWPInstalledApp(IAuthorizationCodeFlow flow)
52 { 56 {
53 innerInstallApp = new AuthorizationCodeInstalledApp(flow, new Author izationCodeBroker()); 57 innerInstallApp = new AuthorizationCodeInstalledApp(flow, new Author izationCodeBroker());
54 } 58 }
55 59
56 #region IAuthorizationCodeInstalledApp Members 60 #region IAuthorizationCodeInstalledApp Members
57 61
58 public IAuthorizationCodeFlow Flow 62 public IAuthorizationCodeFlow Flow
59 { 63 {
60 get { return innerInstallApp.Flow; } 64 get { return innerInstallApp.Flow; }
61 } 65 }
62 66
63 public ICodeReceiver CodeReceiver 67 public ICodeReceiver CodeReceiver
64 { 68 {
65 get { return innerInstallApp.CodeReceiver; } 69 get { return innerInstallApp.CodeReceiver; }
66 } 70 }
67 71
68 public Task<UserCredential> AuthorizeAsync(string userId, CancellationTo ken taskCancellationToken) 72 public Task<UserCredential> AuthorizeAsync(string userId, CancellationTo ken taskCancellationToken)
69 { 73 {
70 return innerInstallApp.AuthorizeAsync(userId, taskCancellationToken) ; 74 return innerInstallApp.AuthorizeAsync(userId, taskCancellationToken) ;
71 } 75 }
72 76
73 #endregion 77 #endregion
74 } 78 }
75 } 79 }
LEFTRIGHT

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