Package com.sun.identity.idm
Class IdUtilsWrapper
java.lang.Object
com.sun.identity.idm.IdUtilsWrapper
Utilities used by other components like policy and auth for identity management.
This is just a wrapper around IdUtils
which allows injection for less tightly coupled code.
-
Method Summary
Modifier and TypeMethodDescriptiongetIdentity
(SSOToken token) Gets the AMIdentity object represented by the SSO token.getIdentity
(SSOToken token, String universalId) Gets the AMIdentity object represented by the universal id.getIdentity
(String userName, String realm) Gets the AMIdentity of a user with username equal to userName that exists in realmgetIdentity
(String userName, String realm, Set<String> userSearchAttributes) Gets the AMIdentity of a user with username equal to userName that exists in realm.Gets the universal identifier of an identity represented by the AMIdentity object.
-
Method Details
-
getUniversalId
Gets the universal identifier of an identity represented by the AMIdentity object.- Parameters:
id
- The AMIdentity object.- Returns:
- String representing the universal identifier of this object.
-
getIdentity
Gets the AMIdentity object represented by the universal id.- Parameters:
token
- non-null token from which to create an identity instance.universalId
- the universal id to create an identity instance for.- Returns:
- The AMIdentity of user identified by the token and the universal id.
- Throws:
IdRepoException
- Thrown if an identity repo error occur.
-
getIdentity
Gets the AMIdentity object represented by the SSO token.- Parameters:
token
- non-null token from which to create an identity instance.- Returns:
- The AMIdentity of user identified by the token.
- Throws:
IdRepoException
- Thrown if an identity repo error occur.SSOException
- Thrown if an error occur handling the token.
-
getIdentity
Gets the AMIdentity of a user with username equal to userName that exists in realm- Parameters:
userName
- username of the user to get.realm
- realm the user belongs to.- Returns:
- The AMIdentity of user with username equal to userName.
-
getIdentity
@Supported public AMIdentity getIdentity(String userName, String realm, Set<String> userSearchAttributes) Gets the AMIdentity of a user with username equal to userName that exists in realm. If no AMIdentity found using username it will fall back to using userSearchAttributes if supplied.- Parameters:
userName
- username of the user to get.realm
- realm the user belongs to.userSearchAttributes
- Alias Search Attribute Name.- Returns:
- The AMIdentity of user with username equal to uName or null if no user found.
-