Browse Source

Merge branch '5.3.x'

pull/28468/head
Sam Brannen 3 years ago
parent
commit
0d4d383068
  1. 11
      spring-web/src/main/java/org/springframework/web/server/session/CookieWebSessionIdResolver.java
  2. 10
      spring-web/src/main/java/org/springframework/web/server/session/HeaderWebSessionIdResolver.java
  3. 14
      spring-web/src/main/java/org/springframework/web/server/session/WebSessionIdResolver.java

11
spring-web/src/main/java/org/springframework/web/server/session/CookieWebSessionIdResolver.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -47,7 +47,7 @@ public class CookieWebSessionIdResolver implements WebSessionIdResolver { @@ -47,7 +47,7 @@ public class CookieWebSessionIdResolver implements WebSessionIdResolver {
/**
* Set the name of the cookie to use for the session id.
* Set the name of the cookie to use for the session ID.
* <p>By default set to "SESSION".
* @param cookieName the cookie name
*/
@ -57,7 +57,7 @@ public class CookieWebSessionIdResolver implements WebSessionIdResolver { @@ -57,7 +57,7 @@ public class CookieWebSessionIdResolver implements WebSessionIdResolver {
}
/**
* Return the configured cookie name.
* Get the configured cookie name.
*/
public String getCookieName() {
return this.cookieName;
@ -65,7 +65,8 @@ public class CookieWebSessionIdResolver implements WebSessionIdResolver { @@ -65,7 +65,8 @@ public class CookieWebSessionIdResolver implements WebSessionIdResolver {
/**
* Set the value for the "Max-Age" attribute of the cookie that holds the
* session id. For the range of values see {@link ResponseCookie#getMaxAge()}.
* session ID.
* <p>For the range of values see {@link ResponseCookie#getMaxAge()}.
* <p>By default set to -1.
* @param maxAge the maxAge duration value
*/
@ -74,7 +75,7 @@ public class CookieWebSessionIdResolver implements WebSessionIdResolver { @@ -74,7 +75,7 @@ public class CookieWebSessionIdResolver implements WebSessionIdResolver {
}
/**
* Return the configured "Max-Age" attribute value for the session cookie.
* Get the configured "Max-Age" attribute value for the session cookie.
*/
public Duration getCookieMaxAge() {
return this.cookieMaxAge;

10
spring-web/src/main/java/org/springframework/web/server/session/HeaderWebSessionIdResolver.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -40,9 +40,9 @@ public class HeaderWebSessionIdResolver implements WebSessionIdResolver { @@ -40,9 +40,9 @@ public class HeaderWebSessionIdResolver implements WebSessionIdResolver {
/**
* Set the name of the session header to use for the session id.
* The name is used to extract the session id from the request headers as
* well to set the session id on the response headers.
* Set the name of the session header to use for the session ID.
* <p>The name is used to extract the session ID from the request headers as
* well to set the session ID on the response headers.
* <p>By default set to {@code DEFAULT_HEADER_NAME}
* @param headerName the header name
*/
@ -52,7 +52,7 @@ public class HeaderWebSessionIdResolver implements WebSessionIdResolver { @@ -52,7 +52,7 @@ public class HeaderWebSessionIdResolver implements WebSessionIdResolver {
}
/**
* Return the configured header name.
* Get the configured header name.
* @return the configured header name
*/
public String getHeaderName() {

14
spring-web/src/main/java/org/springframework/web/server/session/WebSessionIdResolver.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -21,8 +21,8 @@ import java.util.List; @@ -21,8 +21,8 @@ import java.util.List;
import org.springframework.web.server.ServerWebExchange;
/**
* Contract for session id resolution strategies. Allows for session id
* resolution through the request and for sending the session id or expiring
* Contract for session ID resolution strategies. Allows for session ID
* resolution through the request and for sending the session ID or expiring
* the session through the response.
*
* @author Rossen Stoyanchev
@ -32,16 +32,16 @@ import org.springframework.web.server.ServerWebExchange; @@ -32,16 +32,16 @@ import org.springframework.web.server.ServerWebExchange;
public interface WebSessionIdResolver {
/**
* Resolve the session id's associated with the request.
* Resolve the session IDs associated with the request.
* @param exchange the current exchange
* @return the session id's or an empty list
* @return the session IDs or an empty list
*/
List<String> resolveSessionIds(ServerWebExchange exchange);
/**
* Send the given session id to the client.
* Send the given session ID to the client.
* @param exchange the current exchange
* @param sessionId the session id
* @param sessionId the session ID
*/
void setSessionId(ServerWebExchange exchange, String sessionId);

Loading…
Cancel
Save