Class AuthSSOProvider
- java.lang.Object
-
- com.sun.identity.authentication.internal.AuthSSOProvider
-
- All Implemented Interfaces:
SSOProvider
public class AuthSSOProvider extends Object implements SSOProvider
-
-
Constructor Summary
Constructors Constructor Description AuthSSOProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SSOTokencreateSSOToken(jakarta.servlet.http.HttpServletRequest request)Creates an SSOToken.SSOTokencreateSSOToken(String tokenID)Creates an SSOToken.SSOTokencreateSSOToken(String tokenId, boolean invokedByAuth, boolean possiblyResetIdleTime)Creates an SSOToken.SSOTokencreateSSOToken(String tokenID, 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 ignored)This class ignores the "refresh" parameter, which is just not needed here.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 resetIdleTime)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
public SSOToken createSSOToken(jakarta.servlet.http.HttpServletRequest request) throws SSOException, UnsupportedOperationException
Description copied from interface:SSOProviderCreates an SSOToken.- Specified by:
createSSOTokenin interfaceSSOProvider- Parameters:
request- HttpServletRequest- Returns:
- SSOToken
- Throws:
SSOException- is thrown if the SSOToken can't be created.UnsupportedOperationException
-
createSSOToken
public SSOToken createSSOToken(Principal user, String password) throws SSOException, UnsupportedOperationException
Description copied from interface:SSOProviderCreates an SSOToken.- Specified by:
createSSOTokenin interfaceSSOProvider- 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
public SSOToken createSSOToken(String tokenID) throws SSOException, UnsupportedOperationException
Description copied from interface:SSOProviderCreates an SSOToken.- Specified by:
createSSOTokenin interfaceSSOProvider- Parameters:
tokenID- 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
public SSOToken createSSOToken(String tokenId, boolean invokedByAuth, boolean possiblyResetIdleTime) throws SSOException, UnsupportedOperationException
Description copied from interface:SSOProviderCreates an SSOToken.- Specified by:
createSSOTokenin interfaceSSOProvider- Parameters:
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.- Returns:
- SSOToken
- Throws:
SSOException- is thrown if the SSOToken can't be created.UnsupportedOperationException- is thrown when other unsupported operation is performed.
-
createSSOToken
public SSOToken createSSOToken(String tokenID, String clientIP) throws SSOException, UnsupportedOperationException
Description copied from interface:SSOProviderCreates an SSOToken.- Specified by:
createSSOTokenin interfaceSSOProvider- Parameters:
tokenID- 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
public void destroyToken(SSOToken token) throws SSOException
Description copied from interface:SSOProviderDestroys an SSOToken.- Specified by:
destroyTokenin interfaceSSOProvider- Parameters:
token- The SSOToken object to be destroyed- Throws:
SSOException- is thrown if the SSOToken can't be destroyed.
-
logout
public void logout(SSOToken token) throws SSOException
Description copied from interface:SSOProviderLogs out of the session underlying this SSOToken.- Specified by:
logoutin interfaceSSOProvider- Parameters:
token- the sso token to log out.- Throws:
SSOException- if an error occurs during logout.
-
isValidToken
public boolean isValidToken(SSOToken token)
Description copied from interface:SSOProviderChecks if an SSOToken is valid or not. Your token may be refreshed.- Specified by:
isValidTokenin interfaceSSOProvider- Parameters:
token- The SSOToken object to be validated.- Returns:
- true or false, true if the token is valid
-
isValidToken
public boolean isValidToken(SSOToken token, boolean ignored)
This class ignores the "refresh" parameter, which is just not needed here.- Specified by:
isValidTokenin interfaceSSOProvider- Parameters:
token- The SSOToken object to be validated.ignored- The refresh parameter, which is completely ignored.- Returns:
- true if the token is valid, false otherwise.
-
validateToken
public void validateToken(SSOToken token) throws SSOException
Description copied from interface:SSOProviderChecks if the SSOToken is valid.- Specified by:
validateTokenin interfaceSSOProvider- Throws:
SSOException- is thrown if the SSOToken is not valid.
-
refreshSession
public void refreshSession(SSOToken token) throws SSOException, UnsupportedOperationException
Description copied from interface:SSOProviderRefresh the Session corresponding to the SSOToken from the Session Server, always resetting the idle time.- Specified by:
refreshSessionin interfaceSSOProvider- Parameters:
token- SSOToken- Throws:
SSOException- thrown if the session cannot be refreshed for the tokenUnsupportedOperationException
-
refreshSession
public void refreshSession(SSOToken token, boolean resetIdleTime) throws SSOException, UnsupportedOperationException
Description copied from interface:SSOProviderRefresh the Session corresponding to the SSOToken from the Session Server, but only optionally resetting the idle time.- Specified by:
refreshSessionin interfaceSSOProvider- Parameters:
token- SSOTokenresetIdleTime- 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 tokenUnsupportedOperationException
-
destroyToken
public void destroyToken(SSOToken destroyer, SSOToken destroyed) throws SSOException
Description copied from interface:SSOProviderDestroys an SSOToken.- Specified by:
destroyTokenin interfaceSSOProvider- 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.
-
getValidSessions
public Set<SSOToken> getValidSessions(SSOToken requester, String server) throws SSOException
Description copied from interface:SSOProviderReturns valid Sessions.- Specified by:
getValidSessionsin interfaceSSOProvider- 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.
-
-