SmartAuthorizationCodeGrant class

I'm not happy about it, but in order to get values during the authorization flow, it seems I'm going to have to make my own versions of the below functions. These are obviously not written by me (and I wish they didn't have to be modified by me), but they're initially from: https://pub.dev/packages/oauth2, more specifically: https://github.com/dart-lang/oauth2/blob/master/lib/src/authorization_code_grant.dart

A class for obtaining credentials via an authorization code grant.

This method of authorization involves sending the resource owner to the authorization server where they will authorize the client. They're then redirected back to your server, along with an authorization code. This is used to obtain Credentials and create a fully-authorized Client.

To use this class, you must first call getAuthorizationUrl to get the URL to which to redirect the resource owner. Then once they've been redirected back to your application, call handleAuthorizationResponse or handleAuthorizationCode to process the authorization server's response and construct a Client.

authorization code grant http://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-4.1

Constructors

SmartAuthorizationCodeGrant(String identifier, Uri authorizationEndpoint, Uri tokenEndpoint, {String? secret, String? delimiter, bool basicAuth = true, Client? httpClient, CredentialsRefreshedCallback? onCredentialsRefreshed, Map<String, dynamic> getParameters(MediaType? contentType, String body)?, String? codeVerifier})
Creates a new grant.

Properties

authorizationEndpoint Uri
A URL provided by the authorization server that serves as the base for the URL that the resource owner will be redirected to to authorize this client.
final
fhirParameters Map<String, dynamic>
FhirParameters
finalgetter/setter pair
hashCode int
The hash code for this object.
no setterinherited
identifier String
The client identifier for this client.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secret String?
The client secret for this client.
final
tokenEndpoint Uri
A URL provided by the authorization server that this library uses to obtain long-lasting credentials.
final

Methods

close() → void
Closes the grant and frees its resources.
getAuthorizationUrl(Uri redirect, {Iterable<String>? scopes, String? state}) Uri
Returns the URL to which the resource owner should be redirected to authorize this client.
handleAuthorizationCode(String authorizationCode) Future<Client>
Processes an authorization code directly.
handleAuthorizationResponse(Map<String, String> parameters) Future<Client>
Processes the query parameters added to a redirect from the authorization server.
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