feat: enhance cookie creation method with detailed documentation
This commit is contained in:
@@ -105,10 +105,22 @@ public class AuthService {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ResponseCookie.ResponseCookieBuilder buildCookieInternal(String cookieName, String value, Duration validDuration) {
|
/**
|
||||||
|
* Creates a response cookie builder with specified name, value and valid duration.
|
||||||
|
*
|
||||||
|
* @param name name of the cookie
|
||||||
|
* @param value value of the cookie
|
||||||
|
* @param validDuration valid duration of the cookie
|
||||||
|
* @return cookie builder
|
||||||
|
*/
|
||||||
|
protected ResponseCookie.ResponseCookieBuilder buildCookieInternal(
|
||||||
|
String name,
|
||||||
|
String value,
|
||||||
|
Duration validDuration
|
||||||
|
) {
|
||||||
var applicationMode = applicationManager.getApplicationMode();
|
var applicationMode = applicationManager.getApplicationMode();
|
||||||
|
|
||||||
var cookieBuilder = ResponseCookie.from(cookieName, value)
|
var cookieBuilder = ResponseCookie.from(name, value)
|
||||||
.maxAge(securityManager.getTokenValidDuration())
|
.maxAge(securityManager.getTokenValidDuration())
|
||||||
.secure(true)
|
.secure(true)
|
||||||
.maxAge(validDuration)
|
.maxAge(validDuration)
|
||||||
|
|||||||
Reference in New Issue
Block a user