Skip to main content

Methods

ClientCredentialsAsync()

Mints a token for the client itself, with no user behind it.

Parameters

HttpMessageHandler
required
What sends the request.
Whose token_url applies.
(string Id, string Secret)
required
The OAuth client’s id and secret.
IReadOnlyDictionary<string, string>
required
Uri
required
CancellationToken
required
Cancels the call.

Returns

OAuthGrant

ExchangeAsync()

Redeems the code an approval page gave.

Parameters

HttpMessageHandler
required
What sends the request.
Whose token_url applies.
(string Id, string Secret)
required
The OAuth client’s id and secret.
string
required
The code to redeem.
string
required
Where the page sent the code, or null for an app approved with no redirect.
required
The approval request’s PKCE verifier, if it sent one.
IReadOnlyDictionary<string, string>
required
The connection’s values, which pick a sandbox.
CancellationToken
required
Cancels the call.

Returns

OAuthGrant

RedeemAsync()

Redeems a refresh token at the manifest’s auth.token_url.

Parameters

HttpMessageHandler
required
What sends the request.
Whose token_url applies.
(string Id, string Secret)
required
The OAuth client’s id and secret.
string
required
Uri
required
Where to send the request instead of the vendor.
IReadOnlyDictionary<string, string>
required
The connection’s values, which pick a sandbox.
CancellationToken
required

Returns

OAuthGrant

RevokeAsync()

Revokes a refresh token at the manifest’s auth.revoke_url (RFC 7009), which ends the grant behind it. Does nothing for a vendor that declares no revocation.

Parameters

HttpMessageHandler
required
What sends the request.
Whose revoke_url applies.
(string Id, string Secret)
required
The OAuth client’s id and secret.
string
required
The token to revoke.
Uri
required
Where to send the request instead of the vendor.
IReadOnlyDictionary<string, string>
required
The connection’s values, which pick a sandbox.
CancellationToken
required
Cancels the call.

Returns

Task<bool> Whether the manifest declares a revocation, which then succeeded.