Class DefaultStateConfiguration
- java.lang.Object
-
- io.micronaut.security.oauth2.endpoint.authorization.state.DefaultStateConfiguration
-
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,StateValidationConfiguration
@ConfigurationProperties("micronaut.security.oauth2.state") public class DefaultStateConfiguration extends java.lang.Object implements StateValidationConfiguration
Configuration properties implementation of state validation configuration.- Since:
- 1.2.0
- Author:
- James Kleeh
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PREFIX
-
Constructor Summary
Constructors Constructor Description DefaultStateConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.String>
getPersistence()
boolean
isEnabled()
void
setEnabled(boolean enabled)
Sets whether a state parameter will be sent.void
setPersistence(java.lang.String persistence)
Sets the mechanism to persist the state for later retrieval for validation.
-
-
-
Field Detail
-
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPersistence
public java.util.Optional<java.lang.String> getPersistence()
- Specified by:
getPersistence
in interfaceStateValidationConfiguration
- Returns:
- The state persistence mechanism
-
setPersistence
public void setPersistence(java.lang.String persistence)
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
-
-