IAMPASSStartAuthenticationParams.fromJson constructor
IAMPASSStartAuthenticationParams.fromJson(
- Map<String, dynamic> json
)
Implementation
IAMPASSStartAuthenticationParams.fromJson(Map<String, dynamic> json) {
userID = json['user_id'];
user = IAMPASSUser.fromJson(json[_deviceKey]);
durationSeconds = json[_durationKey];
List<String>? stringMethods = json[_methodsKey];
if (stringMethods != null) {
methods = [];
for (var m in stringMethods) {
if (m == AuthenticationMethod.facial.toShortString()) {
methods?.add(AuthenticationMethod.facial);
} else if (m == AuthenticationMethod.acceptance.toShortString()) {
methods?.add(AuthenticationMethod.acceptance);
} else if (m == AuthenticationMethod.device.toShortString()) {
methods?.add(AuthenticationMethod.device);
}
}
}
}