Class LocalServerCodeReceiver

public class LocalServerCodeReceiver : object, ICodeReceiver

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

Object > LocalServerCodeReceiver

Implements

ICodeReceiver

Namespace

Google.Apis.Auth.OAuth2

Assembly

Google.Apis.Auth.dll

Constructors

LocalServerCodeReceiver()

public LocalServerCodeReceiver()

Create an instance of LocalServerCodeReceiver.

LocalServerCodeReceiver(String)

public LocalServerCodeReceiver(string closePageResponse)

Create an instance of LocalServerCodeReceiver.

Parameter
TypeNameDescription
StringclosePageResponse

Custom close page response for this instance

LocalServerCodeReceiver(String, LocalServerCodeReceiver.CallbackUriChooserStrategy)

public LocalServerCodeReceiver(string closePageResponse, LocalServerCodeReceiver.CallbackUriChooserStrategy strategy)

Create an instance of LocalServerCodeReceiver.

Parameters
TypeNameDescription
StringclosePageResponse

Custom close page response for this instance

LocalServerCodeReceiver.CallbackUriChooserStrategystrategy

The strategy to use to determine the callback URI

Properties

RedirectUri

public string RedirectUri { get; }

Gets the redirected URI.

Property Value
TypeDescription
String

Methods

ReceiveCodeAsync(AuthorizationCodeRequestUrl, CancellationToken)

public Task<AuthorizationCodeResponseUrl> ReceiveCodeAsync(AuthorizationCodeRequestUrl url, CancellationToken taskCancellationToken)

Receives the authorization code.

Parameters
TypeNameDescription
AuthorizationCodeRequestUrlurl

The authorization code request URL

CancellationTokentaskCancellationToken

Cancellation token

Returns
TypeDescription
Task<AuthorizationCodeResponseUrl>

The authorization code response

Implements

Extension Method