requestAuthorizationCode method

FutureOr<void> requestAuthorizationCode(
  1. Client client,
  2. String? redirectUri,
  3. Iterable<String> scopes,
  4. String state,
  5. RequestContext req,
  6. ResponseContext res,
  7. bool implicit,
)

Prompt the currently logged-in user to grant or deny access to the client.

In many applications, this will entail showing a dialog to the user in question.

If implicit is true, then the client is requesting an implicit grant. Be aware of the security implications of this - do not handle them exactly the same.

Implementation

FutureOr<void> requestAuthorizationCode(
    Client client,
    String? redirectUri,
    Iterable<String> scopes,
    String state,
    RequestContext req,
    ResponseContext res,
    bool implicit) {
  throw AuthorizationException(
    ErrorResponse(
      ErrorResponse.unsupportedResponseType,
      'Authorization code grants are not supported.',
      state,
    ),
    statusCode: 400,
  );
}