Authorization (ISecurity Interface) |
Gets identity metadata for the specified user.
Category: Authorization methods
Interface version: ISecurity 1.0
Syntax |
GetIdentity(credHandle,identity);
Parameters |
Details |
By specifying a credential handle to the GetIdentity method, it returns a URN-like string describing the identity that corresponds to the specified handle. An identity refers to a Person or IdentityGroup object describing a user in a SAS Metadata Repository. The URN-like string is in the following form:
OMSOBJ: MetadataType/ObjectId
where
MetadataType is Person or IdentityGroup.
ObjectId is a unique metadata object instance identifier in the form Reposid.ObjectId.
If the CREDHANDLE parameter is an empty string, the output is identity metadata for the requesting user.
If the call is being made on behalf of a user whose user ID is known, specify it in the form LOGINID:userid to eliminate the need to issue GetCredentials and FreeCredentials calls before GetIdentity. In the LOGINID:userid string:
LOGINID is a keyword that specifies to search Login objects.
userid is the value of a Login object's UserID= attribute.
Exceptions Thrown |
The SAS Open Metadata Interface explicitly returns the following exception for the GetIdentity method:
InvalidCredHandle
Examples |
The following are Java examples that show the three ways a GetIdentity call can be issued:
// GetIdentity() returns a URN-like string representing the metadata object // identifier of an identity specified in the first parameter. The first // parameter can be specified in one of three ways: StringHolder identityValue = new org.omg.CORBA.StringHolder(); // 1) The first parameter is an empty string: // GetIdentity() returns the Identity associated with // the current connection to the SAS Metadata Server. iSecurity.GetIdentity("",identityValue); // 2) The first parameter is a valid credential handle: // Here the returned Identity corresponds to the credential handle // obtained in the previous call to GetCredentials(). iSecurity.GetIdentity(credHandle.value,identityValue); // 3) The first parameter is a user ID with the prefix: 'LOGINID:' // Here the returned Identity corresponds to specified user ID. String loginId = new String("LOGINID:myUserID"); iSecurity. GetIdentity(loginId.value,identityValue);
Related Methods |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.