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