handle method
Future<String>
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
override
Obtains credentials from an authorization server.
Implementation
@override
Future<String> handle(
Uri authorizationEndpoint,
String identifier, {
String? secret,
http.Client? httpClient,
Iterable<String>? scopes,
bool basicAuth = true,
String? delimiter,
Map<String, dynamic> Function(MediaType? contentType, String body)?
getParameters,
}) async {
final client = await oauth2.resourceOwnerPasswordGrant(
authorizationEndpoint,
username,
password,
secret: secret,
identifier: identifier,
scopes: scopes,
basicAuth: basicAuth,
delimiter: delimiter,
httpClient: httpClient,
getParameters: getParameters,
onCredentialsRefreshed: onCredentialsRefreshed,
);
return client.credentials.toJson();
}