fromJSON static method

AuthenticationClass fromJSON(
  1. String data
)

Implementation

static AuthenticationClass fromJSON(String data) {
	switch (data) {
		case "DIGITAL_ID":
			return AuthenticationClass.digitalId;
		case "TWO_FACTOR_AUTHENTICATION":
			return AuthenticationClass.twoFactorAuthentication;
		case "SHORT_LIVED_TOKEN":
			return AuthenticationClass.shortLivedToken;
		case "EXTERNAL_AUTHENTICATION":
			return AuthenticationClass.externalAuthentication;
		case "PASSWORD":
			return AuthenticationClass.password;
		case "LONG_LIVED_TOKEN":
			return AuthenticationClass.longLivedToken;
		default:
			throw ArgumentError('Invalid AuthenticationClass entry value $data');
		}
}