Class CookiePersistence
java.lang.Object
io.micronaut.security.oauth2.endpoint.authorization.CookiePersistence
- Direct Known Subclasses:
CookiePkcePersistence
,CookieStatePersistence
Utility Abstract class for Cookie Persistence.
- Since:
- 3.9.0
- Author:
- Sergio del Amo
-
Field Summary
Modifier and TypeFieldDescriptionprotected final io.micronaut.http.cookie.CookieConfiguration
-
Constructor Summary
ModifierConstructorDescriptionprotected
CookiePersistence
(io.micronaut.http.cookie.CookieConfiguration cookieConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionretrieveValue
(io.micronaut.http.HttpRequest<?> request) protected void
save
(@NonNull io.micronaut.http.HttpRequest<?> request, @NonNull io.micronaut.http.MutableHttpResponse<?> response, @Nullable String value)
-
Field Details
-
cookieConfiguration
protected final io.micronaut.http.cookie.CookieConfiguration cookieConfiguration
-
-
Constructor Details
-
CookiePersistence
protected CookiePersistence(io.micronaut.http.cookie.CookieConfiguration cookieConfiguration) - Parameters:
cookieConfiguration
- Cookie Configuration
-
-
Method Details
-
retrieveValue
- Parameters:
request
- Request- Returns:
- The value of the cookie specified by
CookieConfiguration.getCookieName()
-
save
protected void save(@NonNull @NonNull io.micronaut.http.HttpRequest<?> request, @NonNull @NonNull io.micronaut.http.MutableHttpResponse<?> response, @Nullable @Nullable String value) - Parameters:
request
- HTTP Requestresponse
- HTTP Responsevalue
- Saves a cookie with nameCookieConfiguration.getCookieName()
with supplied value in the HTTP response.
-