public interface SSOProvider
SSOProvider is the interface that the SSO providers or the
plug-ins need to implement. The implementation class that implements this
interface MUST have the public default no-arg constructor because
SSOTokenManger relies on that to dynamically instantiate an object of such
class using Java Reflection.| Modifier and Type | Method and Description |
|---|---|
SSOToken |
createSSOToken(javax.servlet.http.HttpServletRequest request)
Creates an SSOToken.
|
SSOToken |
createSSOToken(Principal user,
String password)
Creates an SSOToken.
|
SSOToken |
createSSOToken(String sid)
Creates an SSOToken.
|
SSOToken |
createSSOToken(String sid,
boolean invokedByAuth,
boolean possiblyResetIdleTime)
Creates an SSOToken.
|
SSOToken |
createSSOToken(String sid,
String clientIP)
Creates an SSOToken.
|
void |
destroyToken(SSOToken token)
Destroys an SSOToken.
|
void |
destroyToken(SSOToken destroyer,
SSOToken destroyed)
Destroys an SSOToken.
|
Set<SSOToken> |
getValidSessions(SSOToken requester,
String server)
Returns valid Sessions.
|
boolean |
isValidToken(SSOToken token)
Checks if an SSOToken is valid or not.
|
boolean |
isValidToken(SSOToken token,
boolean refresh)
Checks if an SSOToken is valid or not.
|
void |
logout(SSOToken token)
Logs out of the session underlying this SSOToken.
|
void |
refreshSession(SSOToken token)
Refresh the Session corresponding to the SSOToken from the Session
Server, always resetting the idle time.
|
void |
refreshSession(SSOToken token,
boolean resetIdle)
Refresh the Session corresponding to the SSOToken from the Session
Server, but only optionally resetting the idle time.
|
void |
validateToken(SSOToken token)
Checks if the SSOToken is valid.
|
SSOToken createSSOToken(javax.servlet.http.HttpServletRequest request) throws UnsupportedOperationException, SSOException
request - HttpServletRequestSSOException - is thrown if the SSOToken can't be created.UnsupportedOperationExceptionSSOToken createSSOToken(Principal user, String password) throws SSOException, UnsupportedOperationException
user - Principal representing a user or servicepassword - LDAP password of the user or serviceSSOException - is thrown if the SSOToken can't be created.UnsupportedOperationException - is thrown when other errors occur during the token creation.SSOToken createSSOToken(String sid) throws SSOException, UnsupportedOperationException
sid - String representing the SSOToken IdSSOException - is thrown if the SSOToken can't be
created.UnsupportedOperationException - is thrown when other unsupported operation is performed.SSOToken createSSOToken(String sid, boolean invokedByAuth, boolean possiblyResetIdleTime) throws SSOException, UnsupportedOperationException
sid - String representing the SSOToken IdinvokedByAuth - boolean flag indicating that this method has been invoked by the AuthContext.getSSOToken()
API.possiblyResetIdleTime - If true, the idle time of the token/session may be reset to zero. If false, the
idle time will never be reset.SSOException - is thrown if the SSOToken can't be created.UnsupportedOperationException - is thrown when other unsupported operation is performed.SSOToken createSSOToken(String sid, String clientIP) throws SSOException, UnsupportedOperationException
sid - representing the SSOToken IdclientIP - representing the IP address of the clientSSOException - is thrown if the SSOToken can't be created.UnsupportedOperationExceptionvoid destroyToken(SSOToken token) throws SSOException
token - The SSOToken object to be destroyedSSOException - is thrown if the SSOToken can't be destroyed.boolean isValidToken(SSOToken token)
token - The SSOToken object to be validated.boolean isValidToken(SSOToken token, boolean refresh)
token - The SSOToken object to be validated.refresh - Refresh the token only if this flag is set to true.void validateToken(SSOToken token) throws SSOException
SSOException - is thrown if the SSOToken is not valid.void refreshSession(SSOToken token) throws SSOException
token - SSOTokenSSOException - thrown if the session cannot be refreshed for the tokenvoid refreshSession(SSOToken token, boolean resetIdle) throws SSOException
token - SSOTokenresetIdle - if true, reset the idle time to zero, if false, do not do this.SSOException - thrown if the session cannot be refreshed for the tokenvoid destroyToken(SSOToken destroyer, SSOToken destroyed) throws SSOException
destroyer - The SSOToken object used to authorize the operationdestroyed - The SSOToken object to be destroyed.SSOException - thrown if the there was an error during communication with session service.void logout(SSOToken token) throws SSOException
token - the sso token to log out.SSOException - if an error occurs during logout.Set<SSOToken> getValidSessions(SSOToken requester, String server) throws SSOException
requester - The SSOToken object used to authorize the operationserver - The server for which the valid sessions are to be retrievedSSOException - thrown if the there was an error during communication with session service.Copyright © 2010–2023 Open Identity Platform Community. All rights reserved.