Interface LegacyIdentityService


public interface LegacyIdentityService
This is a collection of identity related methods which either should not exist, or belong elsewhere. The intent is to break this apart over time, until it can be removed.
  • Method Details

    • getIdentityName

      String getIdentityName(String universalId)
      Determines the name of the identity based on the provided universal ID.
      Parameters:
      universalId - the universal ID of the identity
      Returns:
      the name of the identity, or null if the name could not be determined
    • doesIdentityExist

      boolean doesIdentityExist(String universalId) throws IdentityException
      Checks whether a given non-null universal ID exists.
      Parameters:
      universalId - non-null universal ID
      Returns:
      whether the universal ID exists
      Throws:
      IdentityException - if there's an error reading from the identity repository
    • getAmIdentity

      AMIdentity getAmIdentity(SSOToken token, String identityName, IdType idType, String realm) throws IdRepoException
      Create an AMIdentity using the specified information.
      Parameters:
      token - the identity's SSO Token
      identityName - the name of the identity
      idType - the type of the identity
      realm - the realm this identity belongs to
      Returns:
      the AMIdentity based on the provided parameters
      Throws:
      IdRepoException
    • getUniversalId

      String getUniversalId(String identityName, IdType idType, String realm) throws IdRepoException
      Determines the universal ID of the user based on the provided details.
      Parameters:
      identityName - the name of the identity
      idType - the type of the identity
      realm - the realm this identity belongs to
      Returns:
      the universal ID based on the provided parameters
      Throws:
      IdRepoException
    • getUniversalId

      Optional<String> getUniversalId(String username, String realmPath, IdType idType)
      Determines the universal ID of the user based on the username and the realm.
      Parameters:
      username - the username attribute of the identity object
      realmPath - the realm path of the realm the identity belongs to
      idType - the type of the identity object
      Returns:
      the universal ID of the identity object in the realm
    • findActiveIdentity

      Optional<AMIdentity> findActiveIdentity(Realm realm, IdType idType, Map<String,Set<String>> searchAttributes) throws SSOException, IdRepoException
      Searches for an AM identity with the given attributes in the given realm. Identity searches will be cached to improve performance.
      Parameters:
      realm - the realm in which to search for identities. Cannot be null
      idType - the type of identity to find. Cannot be null
      searchAttributes - the search attributes. Cannot be null or empty
      Returns:
      the matching identity or else Optional.empty() if there is no unique match
      Throws:
      SSOException - if there is a problem with the SSOToken used for the search
      IdRepoException - if an error occurs during the search
    • findActiveIdentities

      Set<AMIdentity> findActiveIdentities(Realm realm, IdType idType, Map<String,Set<String>> searchAttributes, IdSearchOpModifier searchModifier) throws SSOException, IdRepoException
      Searches for AM identities with the given attributes in the given realm. Identity searches will be cached to improve performance.
      Parameters:
      realm - the realm in which to search for identities. Cannot be null
      idType - the type of identity to find. Cannot be null
      searchAttributes - the search attributes. Cannot be null or empty
      searchModifier - the modifier to use to perform the search
      Returns:
      the potentially empty set of matching identities
      Throws:
      SSOException - if there is a problem with the SSOToken used for the search
      IdRepoException - if an error occurs during the search
    • getIdentityUniversalId

      String getIdentityUniversalId(String subject, String realmPath) throws IdRepoException
      Convert an identity subject to an AMIdentity universal id.
      Parameters:
      subject - the identity subject
      realmPath - the realm path
      Returns:
      the AM identity
      Throws:
      IdRepoException