Class BrokeredIdentityContext

  • public class BrokeredIdentityContext
    extends Object

    Represents all identity information obtained from an IdentityProvider after a successful authentication.

    Pedro Igor
    • Constructor Detail

      • BrokeredIdentityContext

        public BrokeredIdentityContext​(String id)
    • Method Detail

      • getId

        public String getId()
      • setId

        public void setId​(String id)
      • getLegacyId

        public String getLegacyId()
        ID from older API version. For API migrations.
        legacy ID
      • setLegacyId

        public void setLegacyId​(String legacyId)
      • getUsername

        public String getUsername()
        Username in remote idp
      • setUsername

        public void setUsername​(String username)
      • getModelUsername

        public String getModelUsername()
        username to store in UserModel
      • setModelUsername

        public void setModelUsername​(String modelUsername)
      • getEmail

        public String getEmail()
      • setEmail

        public void setEmail​(String email)
      • getBrokerSessionId

        public String getBrokerSessionId()
      • setBrokerSessionId

        public void setBrokerSessionId​(String brokerSessionId)
      • getBrokerUserId

        public String getBrokerUserId()
      • setBrokerUserId

        public void setBrokerUserId​(String brokerUserId)
      • getToken

        public String getToken()
      • setToken

        public void setToken​(String token)
      • setContextData

        public void setContextData​(Map<String,​Object> contextData)
      • setUserAttribute

        public void setUserAttribute​(String attributeName,
                                     String attributeValue)
      • removeUserAttribute

        public void removeUserAttribute​(String attributeName)
      • setUserAttribute

        public void setUserAttribute​(String attributeName,
                                     List<String> attributeValues)
      • getUserAttribute

        public String getUserAttribute​(String attributeName)
      • getFirstName

        public String getFirstName()
      • setFirstName

        public void setFirstName​(String firstName)
      • getLastName

        public String getLastName()
      • setLastName

        public void setLastName​(String lastName)
      • hasMapperGrantedRole

        public boolean hasMapperGrantedRole​(String roleName)
        Verifies if a mapper has already granted the specified role.
        roleName - the name of the role.
        true if a mapper has already granted the role; false otherwise.
      • hasMapperAssignedGroup

        public boolean hasMapperAssignedGroup​(String groupId)
        Verifies if a mapper has already assigned the specified group.
        groupId - the id of the group.
        true if a mapper has already assigned the group; false otherwise.
      • addMapperGrantedRole

        public void addMapperGrantedRole​(String roleName)
        Adds the specified role to the set of roles granted by mappers.
        roleName - the name of the role.
      • addMapperAssignedGroup

        public void addMapperAssignedGroup​(String groupId)
        Adds the specified group to the set of groups assigned by mappers.
        groupId - the id of the group.