|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.iplanet.sso.SSOTokenManager
public final class SSOTokenManager
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 SSOToken
s.
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
SSOToken
s.
Field Summary | |
---|---|
static com.sun.identity.shared.debug.Debug |
debug
Debug class that can be used by SSOProvider implementations |
Method Summary | |
---|---|
SSOToken |
createSSOToken(HttpServletRequest request)
Creates a single sign on token from HttpServletRequest |
SSOToken |
createSSOToken(Principal user,
String password)
Deprecated. 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. |
Field Detail |
---|
public static com.sun.identity.shared.debug.Debug debug
Method Detail |
---|
public static SSOTokenManager getInstance() throws SSOException
SSOTokenManager
.
SSOTokenManager
instance
SSOException
- if unable to get the singleton SSOTokenManager
instance.protected static SSOProvider getProvider(SSOToken token) throws SSOException
token
- Single signon SSOToken
SSOException
- in case of erros when getting the providerpublic SSOToken createSSOToken(HttpServletRequest request) throws SSOException
HttpServletRequest
request
- The HttpServletRequest
object which contains
the session string.
SSOToken
SSOException
- if the single sign on token cannot be created.
UnsupportedOperationException
- if this is an unsupported operation.public SSOToken createSSOToken(Principal user, String password) throws SSOException
getAuthType(), getHostName(), getIPAddress(), setProperty(String name, String value), getProperty(String name), isValid(), validate().
user
- Principal representing a user or servicepassword
- The password supplied for the principal
SSOException
- if the single sign on token cannot be created.
UnsupportedOperationException
- if this is an unsupported operation.public SSOToken createSSOToken(String tokenId) throws SSOException
creatSSOToken(String, String)
OR
createSSOToken(HttpServletRequest)
.
tokenId
- Token ID of the single sign on token
SSOException
- if the single sign on token cannot be created.
UnsupportedOperationException
public SSOToken createSSOToken(String tokenId, String clientIP) throws SSOException
tokenId
- Token ID of the single sign on tokenclientIP
- Client IP address. This must be the IP address of the
client/user who is accessing the application.
SSOException
- if the single sign on token cannot be created.
UnsupportedOperationException
public boolean isValidToken(SSOToken token)
token
- The single sign on token object to be validated.
public void validateToken(SSOToken token) throws SSOException
token
- The single sign on token object to be validated.
SSOException
- if the single sign on token is not valid.public void destroyToken(SSOToken token) throws SSOException
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.public void refreshSession(SSOToken token) throws SSOException
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.public void destroyToken(SSOToken destroyer, SSOToken destroyed) throws SSOException
destroyer
- The single sign on token object used to authorize the
operationdestroyed
- The single sign on token object to be destroyed.
SSOException
- if the there was an error during communication with session
service.public Set getValidSessions(SSOToken requester, String server) throws SSOException
requester
- The single sign on token object used to authorize the
operationserver
- The server for which the valid sessions are to be retrieved
SSOException
- if the there was an error during communication with session
service.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |