public class AuthSSOProvider extends Object implements SSOProvider
Constructor and Description |
---|
AuthSSOProvider() |
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 tokenID)
Creates an SSOToken.
|
SSOToken |
createSSOToken(String tokenId,
boolean invokedByAuth,
boolean possiblyResetIdleTime)
Creates an SSOToken.
|
SSOToken |
createSSOToken(String tokenID,
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 ignored)
This class ignores the "refresh" parameter, which is just not needed here.
|
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 resetIdleTime)
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.
|
public SSOToken createSSOToken(javax.servlet.http.HttpServletRequest request) throws SSOException, UnsupportedOperationException
SSOProvider
createSSOToken
in interface SSOProvider
request
- HttpServletRequestSSOException
- is thrown if the SSOToken can't be created.UnsupportedOperationException
public SSOToken createSSOToken(Principal user, String password) throws SSOException, UnsupportedOperationException
SSOProvider
createSSOToken
in interface SSOProvider
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.public SSOToken createSSOToken(String tokenID) throws SSOException, UnsupportedOperationException
SSOProvider
createSSOToken
in interface SSOProvider
tokenID
- String representing the SSOToken IdSSOException
- is thrown if the SSOToken can't be
created.UnsupportedOperationException
- is thrown when other unsupported operation is performed.public SSOToken createSSOToken(String tokenId, boolean invokedByAuth, boolean possiblyResetIdleTime) throws SSOException, UnsupportedOperationException
SSOProvider
createSSOToken
in interface SSOProvider
tokenId
- 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.public SSOToken createSSOToken(String tokenID, String clientIP) throws SSOException, UnsupportedOperationException
SSOProvider
createSSOToken
in interface SSOProvider
tokenID
- representing the SSOToken IdclientIP
- representing the IP address of the clientSSOException
- is thrown if the SSOToken can't be created.UnsupportedOperationException
public void destroyToken(SSOToken token) throws SSOException
SSOProvider
destroyToken
in interface SSOProvider
token
- The SSOToken object to be destroyedSSOException
- is thrown if the SSOToken can't be destroyed.public void logout(SSOToken token) throws SSOException
SSOProvider
logout
in interface SSOProvider
token
- the sso token to log out.SSOException
- if an error occurs during logout.public boolean isValidToken(SSOToken token)
SSOProvider
isValidToken
in interface SSOProvider
token
- The SSOToken object to be validated.public boolean isValidToken(SSOToken token, boolean ignored)
isValidToken
in interface SSOProvider
token
- The SSOToken object to be validated.ignored
- The refresh parameter, which is completely ignored.public void validateToken(SSOToken token) throws SSOException
SSOProvider
validateToken
in interface SSOProvider
SSOException
- is thrown if the SSOToken is not valid.public void refreshSession(SSOToken token) throws SSOException, UnsupportedOperationException
SSOProvider
refreshSession
in interface SSOProvider
token
- SSOTokenSSOException
- thrown if the session cannot be refreshed for the tokenUnsupportedOperationException
public void refreshSession(SSOToken token, boolean resetIdleTime) throws SSOException, UnsupportedOperationException
SSOProvider
refreshSession
in interface SSOProvider
token
- SSOTokenresetIdleTime
- if true, reset the idle time to zero, if false, do not do this.SSOException
- thrown if the session cannot be refreshed for the tokenUnsupportedOperationException
public void destroyToken(SSOToken destroyer, SSOToken destroyed) throws SSOException
SSOProvider
destroyToken
in interface SSOProvider
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.public Set<SSOToken> getValidSessions(SSOToken requester, String server) throws SSOException
SSOProvider
getValidSessions
in interface SSOProvider
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–2025 Open Identity Platform Community. All rights reserved.