OAuth2Client constructor
OAuth2Client({
- required String authorizeUrl,
- required String tokenUrl,
- String? refreshUrl,
- String? revokeUrl,
- required String redirectUri,
- required String customUriScheme,
- CredentialsLocation credentialsLocation = CredentialsLocation.header,
- String scopeSeparator = ' ',
- String clientIdKey = 'client_id',
- String clientSecretKey = 'client_secret',
Creates a new client instance with the following parameters:
authorizeUrl: the url that must be used to fetch authorization codes (for Authorization Code flows)tokenUrl: the url to be used for generating the OAuth2 access tokensrefreshUrl: the url that must be used for refreshing an Access TokenrevokeUrl: the url to be invoked for token revocationredirectUri: the redirect uri defined in the provider's client registration panelcustomUriScheme: the scheme used for the redirect uricredentialsLocation: where the credentials (client ID / client secret) should be passed (header / body)scopeSeparator: the separator that has to be used to serialize scopes in the token requestclientIdKey: the body field name for the client ID (RFC default: client_id)clientSecretKey: the body field name for the client secret (RFC default: client_secret)
Implementation
OAuth2Client({
required this.authorizeUrl,
required this.tokenUrl,
this.refreshUrl,
this.revokeUrl,
required this.redirectUri,
required this.customUriScheme,
this.credentialsLocation = CredentialsLocation.header,
this.scopeSeparator = ' ',
this.clientIdKey = 'client_id',
this.clientSecretKey = 'client_secret',
});