AuthenticationIdentifier.subFromJson constructor

AuthenticationIdentifier.subFromJson(
  1. Map<String, Object?> json
)

Implementation

factory AuthenticationIdentifier.subFromJson(Map<String, Object?> json) {
  switch (json['type']) {
    case AuthenticationIdentifierTypes.userId:
      return AuthenticationUserIdentifier.fromJson(json);
    case AuthenticationIdentifierTypes.phone:
      return AuthenticationPhoneIdentifier.fromJson(json);
    case AuthenticationIdentifierTypes.thirdParty:
      return AuthenticationThirdPartyIdentifier.fromJson(json);
    default:
      return AuthenticationIdentifier.fromJson(json);
  }
}