OneIdAuthConfig constructor

OneIdAuthConfig({
  1. required OneIdEnvironment environment,
  2. required String clientId,
  3. required String redirectUrl,
  4. List<String>? scopes,
  5. String? discoveryUrl,
  6. String? authorizationEndpoint,
  7. String? tokenEndpoint,
  8. String? endSessionEndpoint,
  9. Duration connectTimeout = const Duration(seconds: 10),
  10. Duration receiveTimeout = const Duration(seconds: 30),
})

Implementation

OneIdAuthConfig({
  required this.environment,
  required this.clientId,
  required this.redirectUrl,
  List<String>? scopes,
  String? discoveryUrl,
  this.authorizationEndpoint,
  this.tokenEndpoint,
  this.endSessionEndpoint,
  this.connectTimeout = const Duration(seconds: 10),
  this.receiveTimeout = const Duration(seconds: 30),
})  : assert(clientId != '', 'clientId must not be empty'),
      assert(redirectUrl != '', 'redirectUrl must not be empty'),
      scopes = List.unmodifiable(
        scopes ?? const ['openid', 'profile', 'offline_access'],
      ),
      discoveryUrl = discoveryUrl ??
          '${environment.baseUrl}/.well-known/openid-configuration';