Config constructor
Config({
- required String tenant,
- String? policy,
- required String clientId,
- String responseType = 'code',
- String? redirectUri,
- required String scope,
- bool webUseRedirect = false,
- String? responseMode,
- String? state,
- String? prompt,
- String? codeChallenge,
- String? codeChallengeMethod,
- String nonce = '12345',
- String tokenIdentifier = 'Token',
- String? clientSecret,
- String? resource,
- bool isB2C = false,
- String? customAuthorizationUrl,
- String? customTokenUrl,
- String? customDomainUrlWithTenantId,
- String? loginHint,
- String? domainHint,
- String? codeVerifier,
- String? userAgent,
- bool isStub = false,
- Widget loader = const SizedBox(),
- AndroidOptions? aOptions,
- CacheLocation? cacheLocation,
- String? origin,
- Map<
String, String> customParameters = const {}, - String? postLogoutRedirectUri,
- PreferredSizeWidget? appBar,
Azure AD OAuth Configuration. Look at individual fields for description.
Implementation
Config({
required this.tenant,
this.policy,
required this.clientId,
this.responseType = 'code',
String? redirectUri,
required this.scope,
this.webUseRedirect = false,
this.responseMode,
this.state,
this.prompt,
this.codeChallenge,
this.codeChallengeMethod,
this.nonce = '12345',
this.tokenIdentifier = 'Token',
this.clientSecret,
this.resource,
this.isB2C = false,
this.customAuthorizationUrl,
this.customTokenUrl,
this.customDomainUrlWithTenantId,
this.loginHint,
this.domainHint,
this.codeVerifier,
this.userAgent,
this.isStub = false,
this.loader = const SizedBox(),
AndroidOptions? aOptions,
CacheLocation? cacheLocation,
required this.navigatorKey,
this.origin,
this.customParameters = const {},
this.postLogoutRedirectUri,
this.appBar,
}) : authorizationUrl = customAuthorizationUrl ??
(isB2C
? (customDomainUrlWithTenantId == null
? 'https://$tenant.b2clogin.com/$tenant.onmicrosoft.com/$policy/oauth2/v2.0/authorize'
: '$customDomainUrlWithTenantId/$policy/oauth2/v2.0/authorize')
: 'https://login.microsoftonline.com/$tenant/oauth2/v2.0/authorize'),
tokenUrl = customTokenUrl ??
(isB2C
? (customDomainUrlWithTenantId == null
? 'https://$tenant.b2clogin.com/$tenant.onmicrosoft.com/$policy/oauth2/v2.0/token'
: '$customDomainUrlWithTenantId/$policy/oauth2/v2.0/token')
: 'https://login.microsoftonline.com/$tenant/oauth2/v2.0/token'),
aOptions = aOptions ?? AndroidOptions(encryptedSharedPreferences: true),
cacheLocation = cacheLocation ?? CacheLocation.localStorage,
redirectUri = redirectUri ?? getDefaultRedirectUri();