public class UserIdentityParser
extends java.lang.Object
| Constructor and Description |
|---|
UserIdentityParser(OIDCCredentials credential,
KeycloakConfiguration keycloakConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
parseEmail()
Parses the user's email address from the user identity
userIdentity |
java.util.Set<UserRole> |
parseRoles()
Parses the user's roles from the user identity
userIdentity |
UserPrincipalImpl |
parseUser() |
java.lang.String |
parseUsername()
Parses the user's username from the user identity
userIdentity |
public UserIdentityParser(OIDCCredentials credential, KeycloakConfiguration keycloakConfiguration) throws AuthenticationException
AuthenticationExceptionpublic java.lang.String parseUsername()
throws org.json.JSONException
userIdentityorg.json.JSONException - if the USERNAME property is not in the userIdentity objectpublic java.lang.String parseEmail()
throws org.json.JSONException
userIdentityorg.json.JSONException - if the EMAIL property is not in the userIdentity objectpublic java.util.Set<UserRole> parseRoles() throws org.json.JSONException
userIdentityorg.json.JSONException - if the REALM property is not in the userIdentity objectpublic UserPrincipalImpl parseUser() throws AuthenticationException
AuthenticationException