resourceOwnerPasswordCredentialsGrant method
Issue an authorization token to a user after authenticating them via username
and password
.
Implementation
FutureOr<AuthorizationTokenResponse> resourceOwnerPasswordCredentialsGrant(
Client? client,
String? username,
String? password,
Iterable<String> scopes,
RequestContext req,
ResponseContext res) async {
var body = await req.parseBody().then((_) => req.bodyAsMap);
throw AuthorizationException(
ErrorResponse(
ErrorResponse.unsupportedResponseType,
'Resource owner password credentials grants are not supported.',
body['state']?.toString() ?? '',
),
statusCode: 400,
);
}