public final class IdUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Set |
supportedTypes |
protected static Map |
typesCanAddMembers |
protected static Map |
typesCanBeMemberOf |
protected static Map |
typesCanHaveMembers |
Constructor and Description |
---|
IdUtils() |
Modifier and Type | Method and Description |
---|---|
static IdRepoException |
convertAMException(AMException ame)
Returns an IdRepoException based on an
AMException |
static AMIdentityRepository |
getAMIdentityRepository(String orgDN)
Returns
AMIdentityRepostiory handle for an organization. |
static String |
getDN(AMIdentity id)
Deprecated.
use
IdentityUtils.getDN(AMIdentity) instead. |
static AMIdentity |
getIdentity(SSOToken token)
Returns a handle of the Identity object based on
the SSO Token passed in (
AMIdentity object of the user
who is authenticated). |
static AMIdentity |
getIdentity(SSOToken token,
String univId)
Returns an
AMIdentity object, if provided with a string
identifier for the object. |
static AMIdentity |
getIdentity(SSOToken token,
String amsdkdn,
String realm)
Returns an
AMIdentity object, given the
DN of an authenticated identity, realm name and identity type. |
static AMIdentity |
getIdentity(String uName,
String realm)
Gets the AMIdentity of a user with username equal to uName that exists in realm
|
static String |
getIdentityName(String uuid,
String orgName)
Returns the user name extracted from the uuid
if the orgName supplied in the parameter is
not same realm name in uuid then
IdRepoException
is thrown |
static String |
getOrganization(SSOToken token,
String orgIdentifier)
Deprecated.
Use
RealmLookup.lookup(String) instead. |
static String |
getServiceName(IdType type)
Returns the name of service which defines the profile information for
this type.
|
static IdType |
getType(String type)
Returns corresponding
IdType object given a type. |
static String |
getUniversalId(AMIdentity id)
Returns a string which uniquely represents this identity object.
|
protected static void |
initialize() |
static boolean |
isOrganizationActive(SSOToken token,
String realm)
Deprecated.
Use
RealmLookup.isActive(Realm) instead. |
public static Set supportedTypes
protected static Map typesCanBeMemberOf
protected static Map typesCanHaveMembers
protected static Map typesCanAddMembers
protected static void initialize()
public static AMIdentity getIdentity(SSOToken token) throws IdRepoException, SSOException
AMIdentity
object of the user
who is authenticated).token
- Single sign on token of user.IdRepoException
- if there are repository related error conditions.SSOException
- if user's single sign on token is invalid.public static String getUniversalId(AMIdentity id)
id
- AMIdentity
object whose string represenation is
needed.id
.public static AMIdentity getIdentity(SSOToken token, String univId) throws IdRepoException
AMIdentity
object, if provided with a string
identifier for the object.token
- SSOToken of the administratorunivId
- String represenation of the identity.IdRepoException
- if the identifier provided is wrong.public static AMIdentity getIdentity(SSOToken token, String amsdkdn, String realm) throws IdRepoException
AMIdentity
object, given the
DN of an authenticated identity, realm name and identity type.
This interface is mainly for authentication component to get
back the identity of the user.token
- SSOToken of the administratoramsdkdn
- DN of the authenticated userrealm
- realm name where the user was authenticatednull
IdRepoException
- if the underly components throws
exception while obtaining the identity objectpublic static String getServiceName(IdType type)
type
- IdType whose service name is needed.public static IdType getType(String type) throws IdRepoException
IdType
object given a type.type
- of object to return.IdRepoException
- if there are no corresponding types.@Deprecated public static String getDN(AMIdentity id)
IdentityUtils.getDN(AMIdentity)
instead.id
- AMIdentity
object.DN
of the object, as represented in the datastore.@Deprecated public static String getOrganization(SSOToken token, String orgIdentifier) throws IdRepoException, SSOException
RealmLookup.lookup(String)
instead.orgIdentifier
- Organization identifierIdRepoException
SSOException
@Deprecated public static boolean isOrganizationActive(SSOToken token, String realm) throws IdRepoException, SSOException
RealmLookup.isActive(Realm)
instead. IdUtils.getOrganization
. In the default mode, where
relams are enabled but backward comaptibility is required, this checks
for organization status in the AM enabled Sun DS. Otherwise, it checks
for organization status from the realms tree.token
- token SSOToken a valid SSOToken.realm
- name of the organization of interest.true
if org is active;
otherwise false
IdRepoException
- if there are repository related error conditions.SSOException
- If user's single sign on token is invalid.public static IdRepoException convertAMException(AMException ame)
AMException
ame
- public static String getIdentityName(String uuid, String orgName) throws IdRepoException
IdRepoException
is thrownuuid
- uuid of the userorgName
- the org user is trying to login toIdRepoException
public static AMIdentity getIdentity(String uName, String realm)
uName
- username of the user to get.realm
- realm the user belongs to.public static AMIdentityRepository getAMIdentityRepository(String orgDN)
AMIdentityRepostiory
handle for an organization.orgDN
- the organization name.AMIdentityRepostiory
objectCopyright © 2010–2025 Open Identity Platform Community. All rights reserved.