AuthProvider.fromJson constructor

AuthProvider.fromJson(
  1. Object? j
)

Implementation

factory AuthProvider.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return AuthProvider(
    id: switch (json['id']) {
      null => '',
      Object $1 => decodeString($1),
    },
    issuer: switch (json['issuer']) {
      null => '',
      Object $1 => decodeString($1),
    },
    jwksUri: switch (json['jwksUri']) {
      null => '',
      Object $1 => decodeString($1),
    },
    audiences: switch (json['audiences']) {
      null => '',
      Object $1 => decodeString($1),
    },
    authorizationUrl: switch (json['authorizationUrl']) {
      null => '',
      Object $1 => decodeString($1),
    },
    jwtLocations: switch (json['jwtLocations']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) JwtLocation.fromJson(i)],
      _ => throw const FormatException('"jwtLocations" is not a list'),
    },
  );
}