getTokenWithAuthCodeFlow method
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, - dynamic httpClient,
- BaseWebAuth? webAuthClient,
- 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);
}