Class TrustedDeviceCookieWriter
java.lang.Object
com.irurueta.authserver.authorization.api.web.mfa.TrustedDeviceCookieWriter
Writes the cookie that identifies a trusted device. The
__Host- prefix makes the browser accept it only
over HTTPS, with Path=/ and no Domain; it is HttpOnly so scripts cannot read it and
SameSite=Lax so it is not sent on cross-site subrequests. Its value is the token signed by the server
(token.signature). It lives as long as the device stays trusted.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(jakarta.servlet.http.HttpServletResponse response, CreatedTrustedDevice created) Adds the cookie of a device that has just been trusted to a response.
-
Field Details
-
COOKIE_NAME
Name of the cookie.- See Also:
-
clock
Source of the current time.
-
-
Constructor Details
-
TrustedDeviceCookieWriter
public TrustedDeviceCookieWriter()
-
-
Method Details
-
write
Adds the cookie of a device that has just been trusted to a response.- Parameters:
response- the response.created- the trusted device and its signed cookie value.
-