oauth2 library Null safety

Classes

AuthorizationCodeGrant
A class for obtaining credentials via an authorization code grant.
Client
An OAuth2 client.
Credentials
Credentials that prove that a client is allowed to access a resource on the resource owner's behalf.

Functions

clientCredentialsGrant(Uri authorizationEndpoint, String? identifier, String? secret, {Iterable<String>? scopes, bool basicAuth = true, Client? httpClient, String? delimiter, Map<String, dynamic> getParameters(MediaType? contentType, String body)?}) Future<Client>
Obtains credentials using a client credentials grant.
resourceOwnerPasswordGrant(Uri authorizationEndpoint, String username, String password, {String? identifier, String? secret, Iterable<String>? scopes, bool basicAuth = true, CredentialsRefreshedCallback? onCredentialsRefreshed, Client? httpClient, String? delimiter, Map<String, dynamic> getParameters(MediaType? contentType, String body)?}) Future<Client>
Obtains credentials using a resource owner password grant.

Typedefs

CredentialsRefreshedCallback = void Function(Credentials)
Type of the callback when credentials are refreshed.

Exceptions / Errors

AuthorizationException
An exception raised when OAuth2 authorization fails.
ExpirationException
An exception raised when attempting to use expired OAuth2 credentials.