Class CookieStatePersistenceConfiguration
- java.lang.Object
-
- io.micronaut.security.oauth2.endpoint.authorization.state.persistence.cookie.CookieStatePersistenceConfiguration
-
- All Implemented Interfaces:
io.micronaut.http.cookie.CookieConfiguration
@ConfigurationProperties("micronaut.security.oauth2.state.cookie") public class CookieStatePersistenceConfiguration extends java.lang.Object implements io.micronaut.http.cookie.CookieConfiguration
- 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 CookieStatePersistenceConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.String>
getCookieDomain()
java.util.Optional<java.time.temporal.TemporalAmount>
getCookieMaxAge()
java.lang.String
getCookieName()
java.util.Optional<java.lang.String>
getCookiePath()
java.util.Optional<java.lang.Boolean>
isCookieHttpOnly()
java.util.Optional<java.lang.Boolean>
isCookieSecure()
void
setCookieDomain(java.lang.String cookieDomain)
Sets the domain name of this Cookie.void
setCookieHttpOnly(java.lang.Boolean cookieHttpOnly)
Whether the Cookie can only be accessed via HTTP.void
setCookieMaxAge(java.time.Duration cookieMaxAge)
Sets the maximum age of the cookie.void
setCookieName(java.lang.String cookieName)
Cookie Name.void
setCookiePath(java.lang.String cookiePath)
Sets the path of the cookie.void
setCookieSecure(java.lang.Boolean cookieSecure)
Sets whether the cookie is secured.
-
-
-
Field Detail
-
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCookieName
@Nonnull public java.lang.String getCookieName()
- Specified by:
getCookieName
in interfaceio.micronaut.http.cookie.CookieConfiguration
-
setCookieName
public void setCookieName(@Nonnull java.lang.String cookieName)
Cookie Name. Default value ("OAUTH2_STATE").- Parameters:
cookieName
- Cookie name
-
getCookieDomain
public java.util.Optional<java.lang.String> getCookieDomain()
- Specified by:
getCookieDomain
in interfaceio.micronaut.http.cookie.CookieConfiguration
-
setCookieDomain
public void setCookieDomain(@Nullable java.lang.String cookieDomain)
Sets the domain name of this Cookie. Default value (null).- Parameters:
cookieDomain
- the domain name of this Cookie
-
getCookiePath
public java.util.Optional<java.lang.String> getCookiePath()
- Specified by:
getCookiePath
in interfaceio.micronaut.http.cookie.CookieConfiguration
-
setCookiePath
public void setCookiePath(@Nullable java.lang.String cookiePath)
Sets the path of the cookie. Default value ("/").- Parameters:
cookiePath
- The path of the cookie.
-
isCookieHttpOnly
public java.util.Optional<java.lang.Boolean> isCookieHttpOnly()
- Specified by:
isCookieHttpOnly
in interfaceio.micronaut.http.cookie.CookieConfiguration
-
setCookieHttpOnly
public void setCookieHttpOnly(java.lang.Boolean cookieHttpOnly)
Whether the Cookie can only be accessed via HTTP. Default value (true).- Parameters:
cookieHttpOnly
- Whether the Cookie can only be accessed via HTTP
-
isCookieSecure
public java.util.Optional<java.lang.Boolean> isCookieSecure()
- Specified by:
isCookieSecure
in interfaceio.micronaut.http.cookie.CookieConfiguration
-
setCookieSecure
public void setCookieSecure(java.lang.Boolean cookieSecure)
Sets whether the cookie is secured. Default value (true).- Parameters:
cookieSecure
- True if the cookie is secure
-
getCookieMaxAge
public java.util.Optional<java.time.temporal.TemporalAmount> getCookieMaxAge()
- Specified by:
getCookieMaxAge
in interfaceio.micronaut.http.cookie.CookieConfiguration
-
setCookieMaxAge
public void setCookieMaxAge(java.time.Duration cookieMaxAge)
Sets the maximum age of the cookie. Default value (5 minutes).- Parameters:
cookieMaxAge
- The maximum age of the cookie
-
-