Package com.iplanet.sso
Interface SSOProvider
-
- All Known Subinterfaces:
SSOProviderPlugin
- All Known Implementing Classes:
AuthSSOProvider,OpenIdConnectSSOProvider,SSOProviderImpl,StatelessSSOProvider
public interface SSOProviderSSOProvideris 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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SSOTokencreateSSOToken(jakarta.servlet.http.HttpServletRequest request)Creates an SSOToken.SSOTokencreateSSOToken(String sid)Creates an SSOToken.SSOTokencreateSSOToken(String sid, boolean invokedByAuth, boolean possiblyResetIdleTime)Creates an SSOToken.SSOTokencreateSSOToken(String sid, String clientIP)Creates an SSOToken.SSOTokencreateSSOToken(Principal user, String password)Creates an SSOToken.voiddestroyToken(SSOToken token)Destroys an SSOToken.voiddestroyToken(SSOToken destroyer, SSOToken destroyed)Destroys an SSOToken.Set<SSOToken>getValidSessions(SSOToken requester, String server)Returns valid Sessions.booleanisValidToken(SSOToken token)Checks if an SSOToken is valid or not.booleanisValidToken(SSOToken token, boolean refresh)Checks if an SSOToken is valid or not.voidlogout(SSOToken token)Logs out of the session underlying this SSOToken.voidrefreshSession(SSOToken token)Refresh the Session corresponding to the SSOToken from the Session Server, always resetting the idle time.voidrefreshSession(SSOToken token, boolean resetIdle)Refresh the Session corresponding to the SSOToken from the Session Server, but only optionally resetting the idle time.voidvalidateToken(SSOToken token)Checks if the SSOToken is valid.
-
-
-
Method Detail
-
createSSOToken
SSOToken createSSOToken(jakarta.servlet.http.HttpServletRequest request) throws UnsupportedOperationException, SSOException
Creates an SSOToken.- Parameters:
request- HttpServletRequest- Returns:
- SSOToken
- Throws:
SSOException- is thrown if the SSOToken can't be created.UnsupportedOperationException
-
createSSOToken
SSOToken createSSOToken(Principal user, String password) throws SSOException, UnsupportedOperationException
Creates an SSOToken.- Parameters:
user- Principal representing a user or servicepassword- LDAP password of the user or service- Returns:
- SSOToken
- Throws:
SSOException- is thrown if the SSOToken can't be created.UnsupportedOperationException- is thrown when other errors occur during the token creation.
-
createSSOToken
SSOToken createSSOToken(String sid) throws SSOException, UnsupportedOperationException
Creates an SSOToken.- Parameters:
sid- String representing the SSOToken Id- Returns:
- SSOToken
- Throws:
SSOException- is thrown if the SSOToken can't be created.UnsupportedOperationException- is thrown when other unsupported operation is performed.
-
createSSOToken
SSOToken createSSOToken(String sid, boolean invokedByAuth, boolean possiblyResetIdleTime) throws SSOException, UnsupportedOperationException
Creates an SSOToken.- Parameters:
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.- Returns:
- SSOToken
- Throws:
SSOException- is thrown if the SSOToken can't be created.UnsupportedOperationException- is thrown when other unsupported operation is performed.
-
createSSOToken
SSOToken createSSOToken(String sid, String clientIP) throws SSOException, UnsupportedOperationException
Creates an SSOToken.- Parameters:
sid- representing the SSOToken IdclientIP- representing the IP address of the client- Returns:
- SSOToken
- Throws:
SSOException- is thrown if the SSOToken can't be created.UnsupportedOperationException
-
destroyToken
void destroyToken(SSOToken token) throws SSOException
Destroys an SSOToken.- Parameters:
token- The SSOToken object to be destroyed- Throws:
SSOException- is thrown if the SSOToken can't be destroyed.
-
isValidToken
boolean isValidToken(SSOToken token)
Checks if an SSOToken is valid or not. Your token may be refreshed.- Parameters:
token- The SSOToken object to be validated.- Returns:
- true or false, true if the token is valid
-
isValidToken
boolean isValidToken(SSOToken token, boolean refresh)
Checks if an SSOToken is valid or not.- Parameters:
token- The SSOToken object to be validated.refresh- Refresh the token only if this flag is set to true.- Returns:
- true if the token is valid, false otherwise
-
validateToken
void validateToken(SSOToken token) throws SSOException
Checks if the SSOToken is valid.- Throws:
SSOException- is thrown if the SSOToken is not valid.
-
refreshSession
void refreshSession(SSOToken token) throws SSOException
Refresh the Session corresponding to the SSOToken from the Session Server, always resetting the idle time.- Parameters:
token- SSOToken- Throws:
SSOException- thrown if the session cannot be refreshed for the token
-
refreshSession
void refreshSession(SSOToken token, boolean resetIdle) throws SSOException
Refresh the Session corresponding to the SSOToken from the Session Server, but only optionally resetting the idle time.- Parameters:
token- SSOTokenresetIdle- if true, reset the idle time to zero, if false, do not do this.- Throws:
SSOException- thrown if the session cannot be refreshed for the token
-
destroyToken
void destroyToken(SSOToken destroyer, SSOToken destroyed) throws SSOException
Destroys an SSOToken.- Parameters:
destroyer- The SSOToken object used to authorize the operationdestroyed- The SSOToken object to be destroyed.- Throws:
SSOException- thrown if the there was an error during communication with session service.
-
logout
void logout(SSOToken token) throws SSOException
Logs out of the session underlying this SSOToken.- Parameters:
token- the sso token to log out.- Throws:
SSOException- if an error occurs during logout.
-
getValidSessions
Set<SSOToken> getValidSessions(SSOToken requester, String server) throws SSOException
Returns valid Sessions.- Parameters:
requester- The SSOToken object used to authorize the operationserver- The server for which the valid sessions are to be retrieved- Returns:
- Set The set of Valid Sessions
- Throws:
SSOException- thrown if the there was an error during communication with session service.
-
-