Interface LoginCookieManager
public interface LoginCookieManager
This class is responsible for managing authentication cookie.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclearLoginCookie(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response) Clear the login cookie in the response so the user is logged out locally.@Nullable CookiegetLoginCookie(@NotNull HttpServletRequest request) Get the login cookie from the request.voidsetLoginCookie(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response, @NotNull Credentials creds) Set the login cookie in the response after a successful authentication.@Nullable AuthenticationInfoverifyLoginCookie(@NotNull HttpServletRequest request) Verify the login cookie in the request.
-
Method Details
-
setLoginCookie
void setLoginCookie(@NotNull @NotNull HttpServletRequest request, @NotNull @NotNull HttpServletResponse response, @NotNull @NotNull Credentials creds) Set the login cookie in the response after a successful authentication.- Parameters:
request-response-creds-
-
verifyLoginCookie
@Nullable @Nullable AuthenticationInfo verifyLoginCookie(@NotNull @NotNull HttpServletRequest request) Verify the login cookie in the request. If the Authentication Handler do not verify the cookie, return null.- Parameters:
request-- Returns:
- AuthenticationInfo
-
getLoginCookie
Get the login cookie from the request. If the Authentication Handler do not verify the cookie, return null.- Parameters:
request-- Returns:
- Cookie
-
clearLoginCookie
void clearLoginCookie(@NotNull @NotNull HttpServletRequest request, @NotNull @NotNull HttpServletResponse response) Clear the login cookie in the response so the user is logged out locally. Used for SP-initiated single logout.- Parameters:
request- the request (used to determine cookie path and secure flag)response- the response to add the clearing cookie to
-