Class IdUtilsWrapper

java.lang.Object
com.sun.identity.idm.IdUtilsWrapper

@Singleton @Supported public class IdUtilsWrapper extends Object
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 Details

    • getUniversalId

      @Supported public String getUniversalId(AMIdentity id)
      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

      @Supported public AMIdentity getIdentity(SSOToken token, String universalId) throws IdRepoException
      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

      @Supported public AMIdentity getIdentity(SSOToken token) throws IdRepoException, SSOException
      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

      @Supported public AMIdentity getIdentity(String userName, String realm)
      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.