AuthorizationCodeGrant class
Obtains credentials using a authorization code grant.
- Implemented types
Constructors
-
AuthorizationCodeGrant({required Uri tokenEndpoint, required Uri redirectUrl, required Future<
void> redirect(Uri authorizationUri), required Future<Uri> listen(Uri redirectUri), CredentialsRefreshedCallback? onCredentialsRefreshed, String? codeVerifier}) -
Obtains credentials using a authorization code grant.
const
Properties
- codeVerifier → String?
-
The PKCE code verifier. Will be generated if one is not provided in the
constructor.
Will be passed to
oauth2
.final - hashCode → int
-
The hash code for this object.
no setterinherited
-
listen
→ Future<
Uri> Function(Uri redirectUri) -
Callback used for listening for the redirectUrl.
final
- onCredentialsRefreshed → CredentialsRefreshedCallback?
-
Callback to be invoked whenever the credentials are refreshed.
final
-
redirect
→ Future<
void> Function(Uri authorizationUri) -
Callback used for redirect the authorizationUrl given by the authorization
server.
final
- redirectUrl → Uri
-
The redirect URL where the resource owner will redirect to.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tokenEndpoint → Uri
-
A URL provided by the authorization server that this library uses to
obtain long-lasting credentials.
final
Methods
-
handle(
Uri authorizationEndpoint, String identifier, {String? secret, Client? httpClient, Iterable< String> ? scopes, bool basicAuth = true, String? delimiter, Map<String, dynamic> getParameters(MediaType? contentType, String body)?}) → Future<String> -
Obtains credentials from an authorization server.
override
-
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