Package org.keycloak.broker.provider
Class BrokeredIdentityContext
java.lang.Object
org.keycloak.broker.provider.BrokeredIdentityContext
Represents all identity information obtained from an IdentityProvider
after a
successful authentication.
- Author:
- Pedro Igor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMapperAssignedGroup
(String groupId) Adds the specified group to the set of groups assigned by mappers.void
addMapperGrantedRole
(String roleName) Adds the specified role to the set of roles granted by mappers.void
addSessionNotesToUserSession
(UserSessionModel userSession) getEmail()
getId()
getIdp()
ID from older API version.username to store in UserModelgetToken()
getUserAttribute
(String attributeName) Username in remote idpboolean
hasMapperAssignedGroup
(String groupId) Verifies if a mapper has already assigned the specified group.boolean
hasMapperGrantedRole
(String roleName) Verifies if a mapper has already granted the specified role.void
removeUserAttribute
(String attributeName) void
setAuthenticationSession
(AuthenticationSessionModel authenticationSession) void
setBrokerSessionId
(String brokerSessionId) void
setBrokerUserId
(String brokerUserId) void
setContextData
(Map<String, Object> contextData) void
void
setFirstName
(String firstName) void
void
setIdp
(IdentityProvider idp) void
setIdpConfig
(IdentityProviderModel idpConfig) void
setLastName
(String lastName) void
setLegacyId
(String legacyId) void
setModelUsername
(String modelUsername) void
Deprecated.void
setSessionNote
(String key, String value) void
void
setUserAttribute
(String attributeName, String attributeValue) void
setUserAttribute
(String attributeName, List<String> attributeValues) void
setUsername
(String username) toString()
-
Constructor Details
-
BrokeredIdentityContext
-
-
Method Details
-
getId
-
setId
-
getLegacyId
ID from older API version. For API migrations.- Returns:
- legacy ID
-
setLegacyId
-
getUsername
Username in remote idp- Returns:
-
setUsername
-
getModelUsername
username to store in UserModel- Returns:
-
setModelUsername
-
getEmail
-
setEmail
-
getBrokerSessionId
-
setBrokerSessionId
-
getBrokerUserId
-
setBrokerUserId
-
getToken
-
setToken
-
getIdpConfig
-
setIdpConfig
-
getIdp
-
setIdp
-
getContextData
-
setContextData
-
setSessionNote
-
addSessionNotesToUserSession
-
setUserAttribute
-
removeUserAttribute
-
setUserAttribute
-
getUserAttribute
-
getAttributes
-
getFirstName
-
setFirstName
-
getLastName
-
setLastName
-
getAuthenticationSession
-
setAuthenticationSession
-
hasMapperGrantedRole
Verifies if a mapper has already granted the specified role.- Parameters:
roleName
- the name of the role.- Returns:
true
if a mapper has already granted the role;false
otherwise.
-
hasMapperAssignedGroup
Verifies if a mapper has already assigned the specified group.- Parameters:
groupId
- the id of the group.- Returns:
true
if a mapper has already assigned the group;false
otherwise.
-
addMapperGrantedRole
Adds the specified role to the set of roles granted by mappers.- Parameters:
roleName
- the name of the role.
-
addMapperAssignedGroup
Adds the specified group to the set of groups assigned by mappers.- Parameters:
groupId
- the id of the group.
-
setName
Deprecated.usesetFirstName(String)
andsetLastName(String)
instead- Parameters:
name
-
-
toString
-
setFirstName(String)
andsetLastName(String)
instead