AuthServerMetadata.fromJson constructor

AuthServerMetadata.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AuthServerMetadata.fromJson(Map<String, dynamic> json) =>
    AuthServerMetadata(
      issuer: json['issuer'] as String,
      authorizationEndpoint: json['authorization_endpoint'] as String,
      tokenEndpoint: json['token_endpoint'] as String,
      tokenEndpointAuthMethodsSupported:
          (json['token_endpoint_auth_methods_supported'] as List<dynamic>?)
              ?.cast<String>() ??
          const ['client_secret_basic'],
      responseTypesSupported:
          (json['response_types_supported'] as List<dynamic>?)
              ?.cast<String>() ??
          const ['code'],
      grantTypesSupported:
          (json['grant_types_supported'] as List<dynamic>?)?.cast<String>() ??
          const ['authorization_code', 'refresh_token'],
      codeChallengeMethodsSupported:
          (json['code_challenge_methods_supported'] as List<dynamic>?)
              ?.cast<String>() ??
          const ['S256'],
      registrationEndpoint: json['registration_endpoint'] as String?,
      revocationEndpoint: json['revocation_endpoint'] as String?,
      introspectionEndpoint: json['introspection_endpoint'] as String?,
    );