getTokenWithAuthCodeFlow method

  1. @override
Future<AccessTokenResponse> getTokenWithAuthCodeFlow({
  1. required String clientId,
  2. List<String>? scopes,
  3. String? clientSecret,
  4. bool enablePKCE = true,
  5. bool enableState = true,
  6. String? state,
  7. String? codeVerifier,
  8. Function? afterAuthorizationCodeCb,
  9. Map<String, dynamic>? authCodeParams,
  10. Map<String, dynamic>? accessTokenParams,
  11. Map<String, String>? accessTokenHeaders,
  12. dynamic httpClient,
  13. BaseWebAuth? webAuthClient,
  14. Map<String, dynamic>? webAuthOpts,
})
override

Requests an Access Token to the OAuth2 endpoint using the Authorization Code Flow.

Implementation

@override
Future<AccessTokenResponse> getTokenWithAuthCodeFlow(
    {required String clientId,
    List<String>? scopes,
    String? clientSecret,
    bool enablePKCE = true,
    bool enableState = true,
    String? state,
    String? codeVerifier,
    Function? afterAuthorizationCodeCb,
    Map<String, dynamic>? authCodeParams,
    Map<String, dynamic>? accessTokenParams,
    Map<String, String>? accessTokenHeaders,
    httpClient,
    BaseWebAuth? webAuthClient,
    Map<String, dynamic>? webAuthOpts}) async {
  return super.getTokenWithAuthCodeFlow(
      clientId: clientId,
      scopes: scopes,
      clientSecret: clientSecret,
      enablePKCE: enablePKCE,
      enableState: enableState,
      state: state,
      codeVerifier: codeVerifier,
      afterAuthorizationCodeCb: afterAuthorizationCodeCb,
      authCodeParams: authCodeParams,
      accessTokenParams: accessTokenParams,
      accessTokenHeaders: {
        ...?accessTokenHeaders,
        ...{'Accept': 'application/json'}
      },
      httpClient: httpClient,
      webAuthClient: webAuthClient,
      webAuthOpts: webAuthOpts);
}