@ConfigurationProperties(value="micronaut.security.token.jwt.cookie") public class JwtCookieConfigurationProperties extends java.lang.Object implements JwtCookieConfiguration
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_COOKIENAME
The default cookie name.
|
static java.lang.String |
DEFAULT_COOKIEPATH
Default Cookie Path.
|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static boolean |
DEFAULT_HTTPONLY
The default http only value.
|
static java.lang.String |
DEFAULT_LOGINFAILURETARGETURL
The default login failure target URL.
|
static java.lang.String |
DEFAULT_LOGINSUCCESSTARGETURL
The default login success target URL.
|
static java.lang.String |
DEFAULT_LOGOUTTARGETURL
The default logout target URL.
|
static boolean |
DEFAULT_SECURE
The default secure value.
|
static java.lang.String |
PREFIX |
Constructor and Description |
---|
JwtCookieConfigurationProperties() |
Modifier and Type | Method and 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.lang.String |
getLoginFailureTargetUrl() |
java.lang.String |
getLoginSuccessTargetUrl() |
java.lang.String |
getLogoutTargetUrl() |
java.util.Optional<java.lang.Boolean> |
isCookieHttpOnly() |
java.util.Optional<java.lang.Boolean> |
isCookieSecure() |
boolean |
isEnabled() |
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.
|
void |
setEnabled(boolean enabled)
Sets whether JWT cookie based security is enabled.
|
void |
setLoginFailureTargetUrl(java.lang.String loginFailureTargetUrl)
Sets the login failure target URL.
|
void |
setLoginSuccessTargetUrl(java.lang.String loginSuccessTargetUrl)
Sets the login success target URL.
|
void |
setLogoutTargetUrl(java.lang.String logoutTargetUrl)
Sets the logout target URL.
|
public static final java.lang.String PREFIX
public static final boolean DEFAULT_ENABLED
public static final boolean DEFAULT_SECURE
public static final boolean DEFAULT_HTTPONLY
public static final java.lang.String DEFAULT_COOKIENAME
public static final java.lang.String DEFAULT_COOKIEPATH
public static final java.lang.String DEFAULT_LOGOUTTARGETURL
public static final java.lang.String DEFAULT_LOGINSUCCESSTARGETURL
public static final java.lang.String DEFAULT_LOGINFAILURETARGETURL
public boolean isEnabled()
isEnabled
in interface io.micronaut.core.util.Toggleable
public java.lang.String getLogoutTargetUrl()
getLogoutTargetUrl
in interface JwtCookieConfiguration
public java.lang.String getLoginSuccessTargetUrl()
getLoginSuccessTargetUrl
in interface JwtCookieConfiguration
public java.lang.String getLoginFailureTargetUrl()
getLoginFailureTargetUrl
in interface JwtCookieConfiguration
public void setLogoutTargetUrl(java.lang.String logoutTargetUrl)
logoutTargetUrl
- The URLpublic void setLoginSuccessTargetUrl(java.lang.String loginSuccessTargetUrl)
loginSuccessTargetUrl
- The URLpublic void setLoginFailureTargetUrl(java.lang.String loginFailureTargetUrl)
loginFailureTargetUrl
- The URLpublic void setEnabled(boolean enabled)
enabled
- True if it is enabledpublic void setCookieName(java.lang.String cookieName)
cookieName
- Cookie name@Nonnull public java.lang.String getCookieName()
getCookieName
in interface io.micronaut.http.cookie.CookieConfiguration
public java.util.Optional<java.lang.String> getCookieDomain()
getCookieDomain
in interface io.micronaut.http.cookie.CookieConfiguration
@Nullable public java.util.Optional<java.lang.String> getCookiePath()
getCookiePath
in interface io.micronaut.http.cookie.CookieConfiguration
public java.util.Optional<java.lang.Boolean> isCookieHttpOnly()
isCookieHttpOnly
in interface io.micronaut.http.cookie.CookieConfiguration
public java.util.Optional<java.lang.Boolean> isCookieSecure()
isCookieSecure
in interface io.micronaut.http.cookie.CookieConfiguration
public java.util.Optional<java.time.temporal.TemporalAmount> getCookieMaxAge()
getCookieMaxAge
in interface io.micronaut.http.cookie.CookieConfiguration
public void setCookieDomain(@Nullable java.lang.String cookieDomain)
cookieDomain
- the domain name of this Cookiepublic void setCookiePath(@Nullable java.lang.String cookiePath)
cookiePath
- The path of the cookie.public void setCookieHttpOnly(java.lang.Boolean cookieHttpOnly)
cookieHttpOnly
- Whether the Cookie can only be accessed via HTTPpublic void setCookieSecure(java.lang.Boolean cookieSecure)
cookieSecure
- True if the cookie is securepublic void setCookieMaxAge(java.time.Duration cookieMaxAge)
cookieMaxAge
- The maximum age of the cookie