TokenRequest constructor
TokenRequest(
- String clientId,
- String redirectUrl, {
- String? clientSecret,
- List<
String> ? scopes, - AuthorizationServiceConfiguration? serviceConfiguration,
- Map<
String, String> ? additionalParameters, - String? refreshToken,
- String? grantType,
- String? issuer,
- String? discoveryUrl,
- String? authorizationCode,
- String? codeVerifier,
- bool allowInsecureConnections = false,
Implementation
TokenRequest(
String clientId,
String redirectUrl, {
this.clientSecret,
List<String>? scopes,
AuthorizationServiceConfiguration? serviceConfiguration,
Map<String, String>? additionalParameters,
this.refreshToken,
this.grantType,
String? issuer,
String? discoveryUrl,
this.authorizationCode,
this.codeVerifier,
bool allowInsecureConnections = false,
}) : assert(
issuer != null ||
discoveryUrl != null ||
(serviceConfiguration?.authorizationEndpoint != null &&
serviceConfiguration?.tokenEndpoint != null),
'Either the issuer, discovery URL or service configuration must be provided') {
this.clientId = clientId;
this.redirectUrl = redirectUrl;
this.scopes = scopes;
this.serviceConfiguration = serviceConfiguration;
this.additionalParameters = additionalParameters;
this.issuer = issuer;
this.discoveryUrl = discoveryUrl;
this.allowInsecureConnections = allowInsecureConnections;
}