IBM WebSphere Extended Deployment (XD)TM
Release 6.0

com.ibm.websphere.objectgrid.security.plugins.builtins
WSTokenCredentialGenerator

java.lang.Object
  |
  +--com.ibm.websphere.objectgrid.security.plugins.builtins.WSTokenCredentialGenerator
All Implemented Interfaces
CredentialGenerator


This class represents a credential (security token) generator when running in the WebSphere Application Server.

When #getCredential() method is called, the Subject assocaited with the current thread is retrieved. Then the security information in this Subject object is converted in to WSTokenCredential. This token has enough information to reauthenticate on the receiving side.

Users can specify whether to retrieve a runAs subject or a caller subject from the thread by using the constant #RUN_AS_SUBJECT or #CALLER_SUBJECT.


Field Summary
public  intRUN_AS_SUBJECT
          
public  intCALLER_SUBJECT
          

Constructor Summary
WSTokenCredentialGenerator(int)
           Constructor a WSTokenCredentialGenerator with the subject type. A valid subject type .


Method Summary
public  CredentialgetCredential()
          
public  intgetType()
          
public  voidsetType(int)
           Set the subject type, either #RUN_AS_SUBJECT or #CALLER_SUBJECT.

Inherited Methods

Methods inherited from java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

RUN_AS_SUBJECT

public 
  static RUN_AS_SUBJECT
a constant representing the runAs Subject type

CALLER_SUBJECT

public 
  static CALLER_SUBJECT
a constant representing the caller Subject type

Constructor Detail

WSTokenCredentialGenerator

public WSTokenCredentialGenerator( int aType)
Constructor a WSTokenCredentialGenerator with the subject type. A valid subject type is either #RUN_AS_SUBJECT or #CALLER_SUBJECT.
Parameters:
aType - either #RUN_AS_SUBJECT or #CALLER_SUBJECT.


Method Detail

getCredential

public Credential getCredential()
This method retrieves the subject from the
See Also:
    getCredential()


getType

public int getType()
Get the subject type


Returns:
     the subject type, either #RUN_AS_SUBJECT or #CALLER_SUBJECT.


setType

public void setType(int aType)
Set the subject type, either #RUN_AS_SUBJECT or #CALLER_SUBJECT.
Parameters:
    aType - the subject type


IBM WebSphere Extended Deployment (XD)TM
Release 6.0