parseAuthorizationCredentialPassword function

AuthorizationCredentialPassword parseAuthorizationCredentialPassword(
  1. Map response
)

Implementation

AuthorizationCredentialPassword parseAuthorizationCredentialPassword(
  Map<dynamic, dynamic> response,
) {
  if (response['type'] == 'password') {
    return AuthorizationCredentialPassword(
      username: response['username'] as String,
      password: response['password'] as String,
    );
  } else {
    throw Exception('Unsupported result type ${response['type']}');
  }
}