- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
setCookie(new String[] {username, Long.toString(expiryTime), signatureValue}, tokenLifetime, request, response);
int tokenLifetime = calculateLoginLifetime(request, successfulAuthentication);
protected int calculateLoginLifetime(HttpServletRequest request, Authentication authentication) {
return getTokenValiditySeconds();
}
protected int getTokenValiditySeconds() {
return tokenValiditySeconds;
}
private int tokenValiditySeconds = TWO_WEEKS_S;
public static final int TWO_WEEKS_S = 1209600;
Spring Security........
Логирование по куки токену.....