com.iplanet.sso
クラス SSOTokenManager

java.lang.Object
  上位を拡張 com.iplanet.sso.SSOTokenManager

public final class SSOTokenManager
extends Object

SSOTokenManager is the final class that is the mediator between the SSO APIs and SSO providers. When an SSO client makes an API invocation, SSOTokenManager will delegate that call to the SSO provider/plug-in. The SSO provider will execute the call and return the results to SSOTokenManager, which in turn returns the results to the SSO client. This decouples the SSO clients from the actual SSO providers. You should be able to replace the SSO provider without having to modify the SSO client. However, the clients can invoke the class methods on the objects returned by the SSOTokenManager.

SSOTokenManager is a singleton class; there can be, at most, only one instance of SSOTokenManager in any given JVM.

SSOTokenManager currently supports only two kinds of provider, one for Grappa and another for Sun OpenSSO. In the future, this will be extended to support

It is assumed that the provider classes or the JAR file is in the CLASSPATH so that they can be found automatically. Providers can be configured using providerimplclass property. This property must be set to the complete (absolute) package name of the main class of the provider. For example, if the provider class is com.iplanet.sso.providers.dpro.SSOProviderImpl, that entire class name including package prefixes MUST be specified. The main class MUST implement the com.iplanet.sso.SSOProvider interface and MUST have a public no-arg default constructor.

The class SSOTokenManager is a final class that provides interfaces to create and validate SSOTokens.

It is a singleton class; an instance of this class can be obtained by calling SSOTokenManager.getInstance().

Having obtained an instance of SSOTokenManager, its methods can be called to create SSOToken, get SSOToken given the SSOTokenID in string format, and to validate SSOTokens.


フィールドの概要
static com.sun.identity.shared.debug.Debug debug
          Debug class that can be used by SSOProvider implementations
 
メソッドの概要
 SSOToken createSSOToken(HttpServletRequest request)
          Creates a single sign on token from HttpServletRequest
 SSOToken createSSOToken(Principal user, String password)
          推奨されていません。 This method has been deprecated. Please use the regular LDAP authentication mechanism instead. More information on how to use the authentication programming interfaces as well as the code samples can be obtained from the "Authentication Service" chapter of the OpenSSO Developer's Guide.
 SSOToken createSSOToken(String tokenId)
          Creates a single sign on token from the single sign on token ID.
 SSOToken createSSOToken(String tokenId, String clientIP)
          Creates a single sign on token from the single sign on token ID.
 void destroyToken(SSOToken token)
          Destroys a single sign on token.
 void destroyToken(SSOToken destroyer, SSOToken destroyed)
          Destroys a single sign on token.
static SSOTokenManager getInstance()
          Returns the singleton instance of SSOTokenManager.
protected static SSOProvider getProvider(SSOToken token)
          Get provider based on SSOToken provided
 Set getValidSessions(SSOToken requester, String server)
          Returns a list of single sign on token objects which correspond to valid Sessions accessible to requester.
 boolean isValidToken(SSOToken token)
          Returns true if a single sign on token is valid.
 void refreshSession(SSOToken token)
          Refresh the Session corresponding to the single sign on token from the Session Server.
 void validateToken(SSOToken token)
          Returns true if the single sign on token is valid.
 

フィールドの詳細

debug

public static com.sun.identity.shared.debug.Debug debug
Debug class that can be used by SSOProvider implementations

メソッドの詳細

getInstance

public static SSOTokenManager getInstance()
                                   throws SSOException
Returns the singleton instance of SSOTokenManager.

戻り値:
The singleton SSOTokenManager instance
例外:
SSOException - if unable to get the singleton SSOTokenManager instance.

getProvider

protected static SSOProvider getProvider(SSOToken token)
                                  throws SSOException
Get provider based on SSOToken provided

パラメータ:
token - Single signon SSOToken
例外:
SSOException - in case of erros when getting the provider

createSSOToken

public SSOToken createSSOToken(HttpServletRequest request)
                        throws SSOException
Creates a single sign on token from HttpServletRequest

パラメータ:
request - The HttpServletRequest object which contains the session string.
戻り値:
single sign on SSOToken
例外:
SSOException - if the single sign on token cannot be created.
UnsupportedOperationException - if this is an unsupported operation.

createSSOToken

public SSOToken createSSOToken(Principal user,
                               String password)
                        throws SSOException
推奨されていません。 This method has been deprecated. Please use the regular LDAP authentication mechanism instead. More information on how to use the authentication programming interfaces as well as the code samples can be obtained from the "Authentication Service" chapter of the OpenSSO Developer's Guide.

Creates a single sign on token after authenticating the principal with the given password. This method of creating a single sign on token should only be used for command line applications and it is forbidden to use this single sign on token in any other context (e.g. policy, federation, etc.). A token created with this method is only valid within the context of the calling application. Once the process exits the token will be destroyed. If token is created using this constructor then ONLY these methods of single sign on token is supported -
  getAuthType(), 
  getHostName(), 
  getIPAddress(), 
  setProperty(String name, String value), 
  getProperty(String name), 
  isValid(), 
  validate(). 
 

パラメータ:
user - Principal representing a user or service
password - The password supplied for the principal
戻り値:
single sign on token
例外:
SSOException - if the single sign on token cannot be created.
UnsupportedOperationException - if this is an unsupported operation.

createSSOToken

public SSOToken createSSOToken(String tokenId)
                        throws SSOException
Creates a single sign on token from the single sign on token ID. Note:-If you want to do Client's IP address validation for the single sign on token then use creatSSOToken(String, String) OR createSSOToken(HttpServletRequest).

パラメータ:
tokenId - Token ID of the single sign on token
戻り値:
single sign on token
例外:
SSOException - if the single sign on token cannot be created.
UnsupportedOperationException

createSSOToken

public SSOToken createSSOToken(String tokenId,
                               String clientIP)
                        throws SSOException
Creates a single sign on token from the single sign on token ID.

パラメータ:
tokenId - Token ID of the single sign on token
clientIP - Client IP address. This must be the IP address of the client/user who is accessing the application.
戻り値:
single sign on token
例外:
SSOException - if the single sign on token cannot be created.
UnsupportedOperationException

isValidToken

public boolean isValidToken(SSOToken token)
Returns true if a single sign on token is valid.

パラメータ:
token - The single sign on token object to be validated.
戻り値:
true if the single sign on token is valid.

validateToken

public void validateToken(SSOToken token)
                   throws SSOException
Returns true if the single sign on token is valid.

パラメータ:
token - The single sign on token object to be validated.
例外:
SSOException - if the single sign on token is not valid.

destroyToken

public void destroyToken(SSOToken token)
                  throws SSOException
Destroys a single sign on token.

パラメータ:
token - The single sign on token object to be destroyed.
例外:
SSOException - if there was an error while destroying the token, or the corresponding session reached its maximum session/idle time, or the session was destroyed.

refreshSession

public void refreshSession(SSOToken token)
                    throws SSOException
Refresh the Session corresponding to the single sign on token from the Session Server. This method should only be used when the client cannot wait the "session cache interval" for updates on any changes made to the session properties in the session server. If the client is remote, calling this method results in an over the wire request to the session server.

パラメータ:
token - single sign on token
例外:
SSOException - if the session reached its maximum session time, or the session was destroyed, or there was an error while refreshing the session.

destroyToken

public void destroyToken(SSOToken destroyer,
                         SSOToken destroyed)
                  throws SSOException
Destroys a single sign on token.

パラメータ:
destroyer - The single sign on token object used to authorize the operation
destroyed - The single sign on token object to be destroyed.
例外:
SSOException - if the there was an error during communication with session service.

getValidSessions

public Set getValidSessions(SSOToken requester,
                            String server)
                     throws SSOException
Returns a list of single sign on token objects which correspond to valid Sessions accessible to requester. Single sign on tokens returned are restricted: they can only be used to retrieve properties and destroy sessions they represent.

パラメータ:
requester - The single sign on token object used to authorize the operation
server - The server for which the valid sessions are to be retrieved
戻り値:
Set The set of single sign on tokens representing valid Sessions.
例外:
SSOException - if the there was an error during communication with session service.