Previous Page | Next Page

Authorization (ISecurity Interface)

GetIdentity

Gets identity metadata for the specified user.

Category: Authorization methods

Interface version: ISecurity 1.0


Syntax

GetIdentity(credHandle,identity);


Parameters

Parameter Type Direction Description
credHandle string in Credential handle identifying a user identity, an empty string, or a user ID in the form LOGINID:userid.
identity string out Resource identifier describing the identity represented by the credential handle.


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

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:


Exceptions Thrown

The SAS Open Metadata Interface explicitly returns the following exception for the GetIdentity method:


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

Previous Page | Next Page | Top of Page