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
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddMapperAssignedGroup(String groupId) Adds the specified group to the set of groups assigned by mappers.voidaddMapperGrantedRole(String roleName) Adds the specified role to the set of roles granted by mappers.voidaddSessionNotesToUserSession(UserSessionModel userSession) getEmail()getId()getIdp()ID from older API version.username to store in UserModelgetToken()getUserAttribute(String attributeName) Username in remote idpbooleanhasMapperAssignedGroup(String groupId) Verifies if a mapper has already assigned the specified group.booleanhasMapperGrantedRole(String roleName) Verifies if a mapper has already granted the specified role.voidremoveUserAttribute(String attributeName) voidsetAuthenticationSession(AuthenticationSessionModel authenticationSession) voidsetBrokerSessionId(String brokerSessionId) voidsetBrokerUserId(String brokerUserId) voidsetContextData(Map<String, Object> contextData) voidvoidsetFirstName(String firstName) voidvoidsetIdp(IdentityProvider idp) voidsetLastName(String lastName) voidsetLegacyId(String legacyId) voidsetModelUsername(String modelUsername) voidDeprecated.voidsetSessionNote(String key, String value) voidvoidsetUserAttribute(String attributeName, String attributeValue) voidsetUserAttribute(String attributeName, List<String> attributeValues) voidsetUsername(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
 - 
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:
 trueif a mapper has already granted the role;falseotherwise.
 - 
hasMapperAssignedGroup
Verifies if a mapper has already assigned the specified group.- Parameters:
 groupId- the id of the group.- Returns:
 trueif a mapper has already assigned the group;falseotherwise.
 - 
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