Authorization (ISecurity Interface) |
Returns a handle to a provider-specific credential.
Category: Authorization methods
Interface version: ISecurity 1.0
Syntax |
GetCredentials(userid,credHandle);
Parameters |
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:
NoCredential
NotTrustedUser
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 |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.