Class AuthUtilsWrapper
- java.lang.Object
-
- org.forgerock.openam.authentication.service.AuthUtilsWrapper
-
public class AuthUtilsWrapper extends Object
Wrapper class around AuthUtils to facilitate testing.
-
-
Constructor Summary
Constructors Constructor Description AuthUtilsWrapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCookieName()Gets the cookie name from System Properties.StringgetPostProcessLogoutURL(jakarta.servlet.http.HttpServletRequest request)Returns the logout redirect url set by the post-process plugin, if any has been set.booleanlogout(String sessionID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)Performs a logout on a given token ensuring the post auth classes are called.
-
-
-
Method Detail
-
getCookieName
public String getCookieName()
Gets the cookie name from System Properties.- Returns:
- The AM Cookie Name.
-
logout
public boolean logout(String sessionID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws SSOException
Performs a logout on a given token ensuring the post auth classes are called.- Parameters:
sessionID- The token id to logout.request- The HTTP request.response- The HTTP response.- Returns:
- true if the token was still valid before logout was called.
- Throws:
SSOException- If token is null or other SSO exceptions.
-
getPostProcessLogoutURL
public String getPostProcessLogoutURL(jakarta.servlet.http.HttpServletRequest request)
Returns the logout redirect url set by the post-process plugin, if any has been set.- Parameters:
request- the http request to get the logout redirect url for.- Returns:
- the logout redirect url or
nullif not set.
-
-