Class LocalServerCodeReceiver
OAuth 2.0 verification code receiver that runs a local server on a free port and waits for a call with the authorization verification code.
Inheritance
System.Object
LocalServerCodeReceiver
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.Auth.OAuth2
Assembly: Google.Apis.Auth.dll
Syntax
public class LocalServerCodeReceiver : ICodeReceiver
Constructors
LocalServerCodeReceiver()
Create an instance of LocalServerCodeReceiver.
Declaration
public LocalServerCodeReceiver()
LocalServerCodeReceiver(String)
Create an instance of LocalServerCodeReceiver.
Declaration
public LocalServerCodeReceiver(string closePageResponse)
Parameters
Type | Name | Description |
---|---|---|
System.String | closePageResponse | Custom close page response for this instance |
Properties
RedirectUri
Gets the redirected URI.
Declaration
public string RedirectUri { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
ReceiveCodeAsync(AuthorizationCodeRequestUrl, CancellationToken)
Receives the authorization code.
Declaration
public Task<AuthorizationCodeResponseUrl> ReceiveCodeAsync(AuthorizationCodeRequestUrl url, CancellationToken taskCancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AuthorizationCodeRequestUrl | url | The authorization code request URL |
System.Threading.CancellationToken | taskCancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<AuthorizationCodeResponseUrl> | The authorization code response |