TokenRequest constructor

TokenRequest(
  1. String clientId,
  2. String redirectUrl, {
  3. String? clientSecret,
  4. List<String>? scopes,
  5. AuthorizationServiceConfiguration? serviceConfiguration,
  6. Map<String, String>? additionalParameters,
  7. String? refreshToken,
  8. String? grantType,
  9. String? issuer,
  10. String? discoveryUrl,
  11. String? authorizationCode,
  12. String? codeVerifier,
  13. 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;
}