Class SPNEGOAutoLoginManager
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.idp.authn.spnego.impl.SPNEGOAutoLoginManager
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent
public class SPNEGOAutoLoginManager extends AbstractInitializableComponent
Component managing the auto-login state via cookie.
-
-
Field Summary
Fields Modifier and Type Field Description static StringAUTOLOGIN_COOKIE_NAMEDefault name of the SPNEGO auto-login cookie.static StringAUTOLOGIN_COOKIE_VALUE_TRUESPNEGO auto-login cookie value representing true.static StringAUTOLOGIN_PARAMETER_NAMEName of the SPNEGO auto-login signaling parameter.private CookieManagercookieManagerManages creation of cookies.private StringcookieNameAuto-login cookie name.private org.slf4j.LoggerlogClass logger.
-
Constructor Summary
Constructors Constructor Description SPNEGOAutoLoginManager()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisable()Disable auto-login.protected voiddoInitialize()voidenable()Enable auto-login, i.e.CookieManagergetCookieManager()Get theCookieManager.booleanisDisabled()Checks whether auto-login is disabled.booleanisEnabled()Checks whether auto-login is enabled.voidsetCookieManager(CookieManager manager)Set theCookieManagerto use.voidsetCookieName(String name)Set the auto-login cookie name.-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
-
-
-
Field Detail
-
AUTOLOGIN_PARAMETER_NAME
@Nonnull @NotEmpty public static final String AUTOLOGIN_PARAMETER_NAME
Name of the SPNEGO auto-login signaling parameter.- See Also:
- Constant Field Values
-
AUTOLOGIN_COOKIE_NAME
@Nonnull @NotEmpty public static final String AUTOLOGIN_COOKIE_NAME
Default name of the SPNEGO auto-login cookie.- See Also:
- Constant Field Values
-
AUTOLOGIN_COOKIE_VALUE_TRUE
@Nonnull @NotEmpty public static final String AUTOLOGIN_COOKIE_VALUE_TRUE
SPNEGO auto-login cookie value representing true.- See Also:
- Constant Field Values
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
cookieManager
@NonnullAfterInit private CookieManager cookieManager
Manages creation of cookies.
-
-
Method Detail
-
setCookieManager
public void setCookieManager(@Nonnull CookieManager manager)Set theCookieManagerto use.- Parameters:
manager- the CookieManager to use.
-
getCookieManager
@NonnullAfterInit public CookieManager getCookieManager()
Get theCookieManager.- Returns:
- the CookieManager.
-
setCookieName
public void setCookieName(@Nonnull @NotEmpty String name)
Set the auto-login cookie name.- Parameters:
name- cookie name- Since:
- 4.2.0
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
enable
public void enable()
Enable auto-login, i.e. set cookie to 'true'.
-
disable
public void disable()
Disable auto-login. i.e. unset cookie.
-
isEnabled
public boolean isEnabled()
Checks whether auto-login is enabled.- Returns:
- true if auto-login is enabled.
-
isDisabled
public boolean isDisabled()
Checks whether auto-login is disabled.- Returns:
- true if auto-login is disabled.
-
-