Class OidcCookieHandler
- java.lang.Object
-
- io.helidon.security.providers.oidc.common.OidcCookieHandler
-
public class OidcCookieHandler extends Object
Handler of cookies used in OIDC.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcookieName()Cookie name.Single<SetCookie.Builder>createCookie(String value)SetCookiebuilder to set a new cookie, returns a future, as the value may need to be encrypted using a remote service.Single<String>decrypt(String cipherText)Decrypt a cipher text into clear text (if encryption is enabled).Optional<Single<String>>findCookie(Map<String,List<String>> headers)Locate cookie in a map of headers and return its value.SetCookie.BuilderremoveCookie()SetCookiebuilder to remove an existing cookie (such as during logout).
-
-
-
Method Detail
-
createCookie
public Single<SetCookie.Builder> createCookie(String value)
SetCookiebuilder to set a new cookie, returns a future, as the value may need to be encrypted using a remote service.- Parameters:
value- value of the cookie- Returns:
- a new builder to configure set cookie configured from OIDC Config
-
cookieName
public String cookieName()
Cookie name.- Returns:
- name of the cookie to use
-
removeCookie
public SetCookie.Builder removeCookie()
SetCookiebuilder to remove an existing cookie (such as during logout).- Returns:
- a new builder to configure set cookie configured from OIDC Config with expiration set to epoch begin and empty value
-
findCookie
public Optional<Single<String>> findCookie(Map<String,List<String>> headers)
Locate cookie in a map of headers and return its value. If the cookie is encrypted, decrypts the cookie value.- Parameters:
headers- headers to process- Returns:
- cookie value, or empty if the cookie could not be found
-
-