Package org.forgerock.am.identity.domain
Interface Identity
- All Known Implementing Classes:
AMIdentity
public interface Identity
Models an identity.
Makes no guarantee that the underlying identity actually exists.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the universal id which represents this identitygetAttribute
(String attrName) Returns the values of the requested attribute.Returns all attributes and values of this identity.getAttributes
(Set<String> attrNames) Returns requested attributes and values of this object.Get theSSOToken
which should be used to authorize operations against this identity.boolean
isExists()
This method determines if the identity exists and returns true or false.
-
Method Details
-
asUniversalId
UniversalId asUniversalId()Return the universal id which represents this identity- Returns:
- The universal id which represents this identity
-
getSSOToken
SSOToken getSSOToken()Get theSSOToken
which should be used to authorize operations against this identity.- Returns:
- The token to use for authorization
-
getAttributes
Returns all attributes and values of this identity. This method is only valid for Identity objects of type User, Agent, Group, and Role.- Returns:
- Map of attribute-values
- Throws:
IdRepoException
- If there are repository related error conditionsSSOException
- If user's single sign on token is invalid
-
getAttributes
Returns requested attributes and values of this object.This method is only valid for Identity object of type User, Agent, Group, and Role.
- Parameters:
attrNames
- Set of attribute names to be read- Returns:
- Map of attribute-values
- Throws:
IdRepoException
- If there are repository related error conditionsSSOException
- If user's single sign on token is invalid
-
getAttribute
Returns the values of the requested attribute. Returns an empty set, if the attribute is not set in the object.This method is only valid for Identity objects of type User, Agent, Group, and Role.
- Parameters:
attrName
- Name of attribute- Returns:
- Set of attribute values
- Throws:
IdRepoException
- if there are repository related error conditionsSSOException
- If user's single sign on token is invalid
-
isExists
This method determines if the identity exists and returns true or false.This method is only valid for Identity objects of type User and Agent.
- Returns:
- true if the identity exists or false otherwise
- Throws:
IdRepoException
- If there are repository related error conditionsSSOException
- If user's single sign on token is invalid
-