Questions tagged [spring-session]

Spring Session provides a common infrastructure for managing user’s session information.

Spring Session provides a common infrastructure for managing user’s session information. This provides many Benefits including:

  • Accessing a session from any environment (i.e. web, messaging infrastructure, etc)

  • In a web environment

    • Support for clustering in a vendor neutral way

    • Pluggable strategy for determining the session id

    • Easily keep the HttpSession alive when a WebSocket is active

Resources

748 questions
3
votes
1 answer

How do I make jcaptcha work with Spring Session?

We implemented Spring Session backed by Redis and have a cluster of Tomcat servers. When we turned sticky sessions off by not setting the jvmRoute we keep getting "Text verification failed" in the jcaptcha service. I assume this is because the…
dukethrash
  • 1,449
  • 4
  • 15
  • 25
3
votes
1 answer

Spring Session with JDBC - How to Use a Separate DB as a Session Store

I am working on an application that uses Spring Session JDBC. I also am using Spring JPA for other entities. My question is, how does one configure a Spring Boot application to allow for a separate database to be used for Session storage? I have…
KellyM
  • 2,472
  • 6
  • 46
  • 90
3
votes
3 answers

InResponseToField error after Spring Session upgrade

We are not able to upgrade from Spring session 1.3.3 to 2.1.2 due to problems with Spring Security SAML. It seems that Spring Security SAML cannot verify the InResponseToField value because two session IDs are being created: Caused by:…
Erlend Garåsen
  • 161
  • 1
  • 9
3
votes
1 answer

Spring Session/Redis and Oauth2 not working together

Oauth2 and Redis will not play well together. As soon as I'm enabling Spring Session, two session IDs are created after I have been authenticated (OIDC) and sent back to the application — one JSESSIONID from Redis and another from Spring Security…
3
votes
1 answer

How to configure Spring sessions to work with Redis in xml?

In our project we use xml configurations. My task is to store sessions in Redis. I looked for the solution in different sites but I couldn't find appropriate solving. Could you please give me the relevant way to solve problem or to say what I am…
Zulfuqar Aliyev
  • 241
  • 3
  • 18
3
votes
0 answers

SessionManagementFilter thread safety

I'm facing some problems with concurrent session management, in particular when multiple concurrent requests are performed. Using this configuration: http .sessionManagement() .sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED) …
3
votes
1 answer

DefaultCookieSerializer.setJvmRoute is not working

I am trying to incorporate SpringSession into my application, but I also want to preserve server affinity as I have Talend jobs that require sticky sessions. I can get the SpringSession with Redis working as desired, and to get the server affinity…
DaithiG
  • 849
  • 1
  • 9
  • 15
3
votes
1 answer

How to create the bean of FindByIndexNameSessionRepository

I am trying to create the Bean of FindByIndexNameSessionRepository. I need to get all user sessions using it but I am getting the bean error even I already defined it. I am using the Spring Boot Starter 1.5.7 Error: Field sessionRepository required…
Sumit Sood
  • 441
  • 7
  • 23
3
votes
2 answers

How to modify or custom sessionId in spring session project?

My project use Spring Boot and Spring Session,now i want to modify or custom sessionId before session data persistence in redis,How should I do? thanks!
dslzc
  • 33
  • 1
  • 4
3
votes
1 answer

How to protect the same resource using both spring-session and spring-security-oauth

I have a requirement to use two kinds of authentication, for web we @EnableRedisHttpSession and for other consumers like mobile we use @EnableAuthorizationServer with @EnableResourceServer. suppose we try to protect a controller common to both the…
Ankur
  • 205
  • 4
  • 15
3
votes
1 answer

Spring session replication with mongodb not working as expected

I am replicating session using mongodb below is the configuration I am using @Configuration @EnableMongoHttpSession public class MongoSessionReplication { @Bean public AbstractMongoSessionConverter mongoSessionConverter() { List
Amit Sharma
  • 1,202
  • 11
  • 26
3
votes
2 answers

Exception threw in IntegrationTest: RedisCommandExecutionException: ERR no such key

Currently I am trying to convert microservice sample to Spring 5 reactive stack, but when create a simple auth service with Redis(store sessions via Spring Data Redis) and Cassandra(user data via Spring Data Cassandra). The complete source of the…
3
votes
0 answers

How to retrieve WebSession using WebFlux and WebSocketSession in latest versions of spring?

I have been trying to retrieve the WebSession from WebSocketSessionHandler (namespace: org.springframework.web.reactive.socket) in order to use it in my send consumer (using FluxSink). I have been digging through the whole spring source code and…
3
votes
1 answer

Is it wrong to use sessions in Microservices?

I have read that, session is against the concept of RESTfulness. Do sessions really violate RESTfulness? Session Management in microservices RESTful Authentication Since Microservices inevitably use REST, does the same apply here as well? If so,…
codingsplash
  • 4,785
  • 12
  • 51
  • 90
3
votes
1 answer

spring session is not compatible with MockHttpSession

The following test fails when I try to integrate spring session. class WeChatOAuth2AuthenticationFilterTest extends AbstractWebMvcTest { @Test void it_should_redirect_user_to_origin_uri_when_wechat_oauth_is_finished() throws Exception { …