[go: nahoru, domu]

Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(249)
Side by Side Diff: 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/
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:
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 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 /// <param name="authorizationCodeFlowInitializer">A authorization code flow initializer.</param> 42 /// Constructs a new authorization code for Windows Phone targeting an i nstalled application flow.
43 /// </summary>
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
51 /// <summary>
52 /// Constructs a new authorization code for Windows Phone targeting an i nstalled application flow.
53 /// </summary>
54 /// <param name="flow">An authorization code flow.</param>
55 public AuthorizationCodeWPInstalledApp(IAuthorizationCodeFlow flow)
56 {
57 innerInstallApp = new AuthorizationCodeInstalledApp(flow, new Author izationCodeBroker());
58 }
59
49 #region IAuthorizationCodeInstalledApp Members 60 #region IAuthorizationCodeInstalledApp Members
50 61
51 public IAuthorizationCodeFlow Flow 62 public IAuthorizationCodeFlow Flow
52 { 63 {
53 get { return innerInstallApp.Flow; } 64 get { return innerInstallApp.Flow; }
54 } 65 }
55 66
56 public ICodeReceiver CodeReceiver 67 public ICodeReceiver CodeReceiver
57 { 68 {
58 get { return innerInstallApp.CodeReceiver; } 69 get { return innerInstallApp.CodeReceiver; }
59 } 70 }
60 71
61 public Task<UserCredential> AuthorizeAsync(string userId, CancellationTo ken taskCancellationToken) 72 public Task<UserCredential> AuthorizeAsync(string userId, CancellationTo ken taskCancellationToken)
62 { 73 {
63 return innerInstallApp.AuthorizeAsync(userId, taskCancellationToken) ; 74 return innerInstallApp.AuthorizeAsync(userId, taskCancellationToken) ;
64 } 75 }
65 76
66 #endregion 77 #endregion
67 } 78 }
68 } 79 }
OLDNEW

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