KeycloakConfig constructor

KeycloakConfig({
  1. required String bundleIdentifier,
  2. required String clientId,
  3. required String frontendUrl,
  4. required String realm,
  5. List<String>? additionalScopes,
  6. String? clientSecret,
  7. bool? allowInsecureConnections,
})

Implementation

KeycloakConfig({
  required this.bundleIdentifier,
  required this.clientId,
  required this.frontendUrl,
  required this.realm,
  this.additionalScopes,
  this.clientSecret,
  bool? allowInsecureConnections,
})  : _allowInsecureConnections =
          allowInsecureConnections ?? !frontendUrl.startsWith('https://'),
      assert(
        RegExp(r'^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*$')
            .hasMatch(bundleIdentifier),
        'Invalid bundle identifier: must be a valid hostname (no spaces, underscores, etc.).',
      );