Previous Page | Next Page

Authorization (ISecurity Interface)

GetCredentials

Returns a handle to a provider-specific credential.

Category: Authorization methods

Interface version: ISecurity 1.0


Syntax

GetCredentials(userid,credHandle);


Parameters

Parameter Type Direction Description
userid string in Passed user ID of the authenticated user for whom a credential is requested, or an empty string.
credHandle string out Returned credential handle identifying a user.


Details

The GetCredentials method returns a credential handle for the user identified in the USERID parameter. If the USERID parameter contains an empty string, a credential handle is returned for the user making the request.

A credential handle is a token representing an identity's authorizations on the SAS Metadata Server. Clients get and use the handle to reduce the number of authorization requests made to the SAS Metadata Server on behalf of a user.

Every credential handle that is returned by the GetCredentials method should be freed using the FreeCredentials method when it is no longer needed.


Exceptions Thrown

The SAS Open Metadata Interface explicitly returns the following exceptions for the GetCredentials method:


Example

The following is a Java example of a GetCredentials method call:

public void getCredentials() throws Exception {
   try
   {
      String testUserId = new String("myDomain\myUserID");
      StringHolder credHandle = new StringHolder();

      iSecurity.GetCredentials(testUserId,credHandle);
   }
catch (Exception e) {
   System.out.println("GetCredentials: Exceptions");
   e.printStackTrace();
   throw e;
   }

}


Related Methods

Previous Page | Next Page | Top of Page