DVOAuth2Client class

Drives the authorization-code flow with PKCE.

Constructors

DVOAuth2Client({required DVOAuth2Config config, DVHttpSend transport = dvSendHttpRequest, Random? random})

Properties

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

Methods

createAuthorization({List<String>? scopes}) → DVOAuth2Authorization
Builds the URL to send the user to, plus the secrets needed to finish.
exchangeCode({required String code, required String returnedState, required DVOAuth2Authorization pending}) → Future<DVOAuth2Tokens>
Exchanges the callback code for tokens.
fetchUserInfo(DVOAuth2Tokens tokens) → Future<Map<String, Object?>>
Fetches the profile from the configured user-info endpoint.
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

Static Methods

codeChallengeFor(String verifier) → String
RFC 7636 S256 challenge: base64url(sha256(verifier)), unpadded.