Class DefaultStateConfiguration
java.lang.Object
io.micronaut.security.oauth2.endpoint.authorization.state.DefaultStateConfiguration
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,StateValidationConfiguration
,PersistableConfiguration
@ConfigurationProperties("micronaut.security.oauth2.state")
public class DefaultStateConfiguration
extends Object
implements StateValidationConfiguration
Configuration properties implementation of state validation configuration.
- Since:
- 1.2.0
- Author:
- James Kleeh
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
The default enable value.static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
setEnabled
(boolean enabled) Sets whether a state parameter will be sent.void
setPersistence
(String persistence) Sets the mechanism to persist the state for later retrieval for validation.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
-
Constructor Details
-
DefaultStateConfiguration
public DefaultStateConfiguration()
-
-
Method Details
-
getPersistence
- Specified by:
getPersistence
in interfacePersistableConfiguration
- Returns:
- The nonce persistence mechanism
-
setPersistence
Sets the mechanism to persist the state for later retrieval for validation. Supported values ("session", "cookie"). Default value ("cookie").- Parameters:
persistence
- The persistence mechanism
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Sets whether a state parameter will be sent. Default (true).- Parameters:
enabled
- The enabled flag
-