CarpUser.fromJWT constructor
Implementation
factory CarpUser.fromJWT(Map<String, dynamic> jwt, OidcToken token) {
return CarpUser(
username: jwt['preferred_username'] as String,
id: jwt['sub'] as String,
firstName: jwt['given_name'] as String?,
lastName: jwt['family_name'] as String?,
email: jwt['email'] as String?,
roles: jwt['realm_access']['roles'] as List<dynamic>? ?? [],
token: OAuthToken.fromTokenResponse(token),
);
}