Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Duende.​IdentityModel.​Client.​HttpClientTokenRequestExtensions
Assembly: Duende.IdentityModel
Inheritance: object → HttpClientTokenRequestExtensions
HttpClient extensions for OAuth token requests
Methods
public static
System.​Threading.​Tasks.​Task<​TokenResponse>
RequestClientCredentialsTokenAsync​(System.​Net.​Http.​HttpMessageInvoker client,
ClientCredentialsTokenRequest request,
System.​Threading.​CancellationToken cancellationToken = null)
Sends a token request using the client_credentials grant type.
client
The client.
request
The request.
cancellationToken
The cancellation token.
public static
System.​Threading.​Tasks.​Task<​TokenResponse>
RequestDeviceTokenAsync​(System.​Net.​Http.​HttpMessageInvoker client,
DeviceTokenRequest request,
System.​Threading.​CancellationToken cancellationToken = null)
Sends a token request using the urn:ietf:params:oauth:grant-type:device_code grant type.
client
The client.
request
The request.
cancellationToken
The cancellation token.
public static
System.​Threading.​Tasks.​Task<​TokenResponse>
RequestPasswordTokenAsync​(System.​Net.​Http.​HttpMessageInvoker client,
PasswordTokenRequest request,
System.​Threading.​CancellationToken cancellationToken = null)
Sends a token request using the password grant type.
client
The client.
request
The request.
cancellationToken
The cancellation token.
public static
System.​Threading.​Tasks.​Task<​TokenResponse>
RequestAuthorizationCodeTokenAsync​(System.​Net.​Http.​HttpMessageInvoker client,
AuthorizationCodeTokenRequest request,
System.​Threading.​CancellationToken cancellationToken = null)
Sends a token request using the authorization_code grant type.
client
The client.
request
The request.
cancellationToken
The cancellation token.
public static
System.​Threading.​Tasks.​Task<​TokenResponse>
RequestRefreshTokenAsync​(System.​Net.​Http.​HttpMessageInvoker client,
RefreshTokenRequest request,
System.​Threading.​CancellationToken cancellationToken = null)
Sends a token request using the refresh_token grant type.
client
The client.
request
The request.
cancellationToken
The cancellation token.
public static
System.​Threading.​Tasks.​Task<​TokenResponse>
RequestTokenExchangeTokenAsync​(System.​Net.​Http.​HttpMessageInvoker client,
TokenExchangeTokenRequest request,
System.​Threading.​CancellationToken cancellationToken = null)
Sends a token exchange request.
client
The client.
request
The request.
cancellationToken
The cancellation token.
public static
System.​Threading.​Tasks.​Task<​TokenResponse>
RequestBackchannelAuthenticationTokenAsync​(System.​Net.​Http.​HttpMessageInvoker client,
BackchannelAuthenticationTokenRequest request,
System.​Threading.​CancellationToken cancellationToken = null)
Sends a token request using the urn:openid:params:grant-type:ciba grant type.
client
The client.
request
The request.
cancellationToken
The cancellation token.
public static
System.​Threading.​Tasks.​Task<​TokenResponse>
RequestTokenAsync​(System.​Net.​Http.​HttpMessageInvoker client,
TokenRequest request,
System.​Threading.​CancellationToken cancellationToken = null)
Sends a token request.
client
The client.
request
The request.
cancellationToken
The cancellation token.
public static
System.​Threading.​Tasks.​Task<​TokenResponse>
RequestTokenRawAsync​(System.​Net.​Http.​HttpMessageInvoker client,
string address,
Parameters parameters,
System.​Threading.​CancellationToken cancellationToken = null)
Sends a token request.
client
The client.
address
The address.
parameters
The parameters.
cancellationToken
The cancellation token.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object