OAuth2AccessTokenResponseClient<T extends AbstractOAuth2AuthorizationGrantRequest> class abstract interface

Calls the provider's token endpoint for one kind of grant and reads the answer.

The login uses the authorization_code client, the authorized client manager the refresh_token and client_credentials ones. Declare a bean of the same type to talk to a provider that wants something special (an extra parameter, a signed client assertion).

// An extra `audience` parameter that Auth0 needs.
@Bean()
OAuth2AccessTokenResponseClient<OAuth2ClientCredentialsGrantRequest>
clientCredentials(HttpTransport transport) =>
    DefaultClientCredentialsTokenResponseClient(
      transport,
      parameters: (request) => {'audience': 'https://api.example.com'},
    );

Spring (Java): OAuth2AccessTokenResponseClient.

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

getTokenResponse(T grantRequest) → Future<OAuth2AccessTokenResponse>
The provider's answer to grantRequest.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited