Class PkceConfigurationProperties
- java.lang.Object
-
- io.micronaut.security.oauth2.endpoint.authorization.pkce.PkceConfigurationProperties
-
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable,PkceConfiguration,PersistableConfiguration
@ConfigurationProperties("micronaut.security.oauth2.pkce") public class PkceConfigurationProperties extends java.lang.Object implements PkceConfigurationConfiguration properties implementation of PKCE.- Since:
- 3.9.0
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_ENABLEDThe default enable value.static java.lang.StringPERSISTENCE_COOKIEstatic java.lang.StringPERSISTENCE_SESSIONstatic java.lang.StringPREFIX
-
Constructor Summary
Constructors Constructor Description PkceConfigurationProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetEntropy()java.util.Optional<java.lang.String>getPersistence()booleanisEnabled()voidsetEnabled(boolean enabled)Sets whether a state parameter will be sent.voidsetEntropy(int entropy)entropy (in bytes) used for the code verifier generation.voidsetPersistence(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
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED
The default enable value.- See Also:
- Constant Field Values
-
PERSISTENCE_COOKIE
public static final java.lang.String PERSISTENCE_COOKIE
- See Also:
- Constant Field Values
-
PERSISTENCE_SESSION
public static final java.lang.String PERSISTENCE_SESSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEntropy
public int getEntropy()
- Specified by:
getEntropyin interfacePkceConfiguration- Returns:
- entropy (in bytes) used for the code verifier generation.
-
setEntropy
public void setEntropy(int entropy)
entropy (in bytes) used for the code verifier generation. Default value 64.- Parameters:
entropy- entropy (in bytes) used for the code verifier.
-
getPersistence
@NonNull public java.util.Optional<java.lang.String> getPersistence()
- Specified by:
getPersistencein interfacePersistableConfiguration- Returns:
- The nonce 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:
isEnabledin 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
-
-