Package net.shibboleth.idp.authn.spnego.impl

# Class SPNEGOAutoLoginManager

java.lang.Object
net.shibboleth.shared.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 final String`
`AUTOLOGIN_COOKIE_NAME`
Default name of the SPNEGO auto-login cookie.
`static final String`
`AUTOLOGIN_COOKIE_VALUE_TRUE`
SPNEGO auto-login cookie value representing true.
`static final String`
`AUTOLOGIN_PARAMETER_NAME`
Name of the SPNEGO auto-login signaling parameter.
`private CookieManager`
`cookieManager`
Manages creation of cookies.
`private String`
`cookieName`
Auto-login cookie name.
`private final org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Constructor
Description
`SPNEGOAutoLoginManager()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`disable()`
Disable auto-login.
`protected void`
`doInitialize()`
`void`
`enable()`
Enable auto-login, i.e.
`CookieManager`
`getCookieManager()`
Get the `CookieManager`.
`boolean`
`isDisabled()`
Checks whether auto-login is disabled.
`boolean`
`isEnabled()`
Checks whether auto-login is enabled.
`void`
`setCookieManager(CookieManager manager)`
Set the `CookieManager` to use.
`void`
`setCookieName(String name)`
Set the auto-login cookie name.

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### 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.

### cookieName

@Nonnull @NotEmpty private String cookieName
Auto-login cookie name.

## Constructor Details

### SPNEGOAutoLoginManager

public SPNEGOAutoLoginManager()
Constructor.

## Method Details

### setCookieManager

public void setCookieManager(@Nonnull CookieManager manager)
Set the `CookieManager` to use.

Parameters:
  `manager` - the CookieManager to use.

### getCookieManager

@NonnullAfterInit public CookieManager getCookieManager()
Get the `CookieManager`.

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:
  `doInitialize` in class `AbstractInitializableComponent`
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.