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
22
votes
2 answers

What is the default session timeout and how to configure it when using the Spring Session with Redis as the backend?

My application currently use Spring Session together with Redis as the backend. I searched into the official documentation for Spring Session but was not able to find what the default session timeout is when using that module. Also I am not sure how…
balteo
  • 23,602
  • 63
  • 219
  • 412
18
votes
4 answers

Is it possible to use Spring Boot session without Redis?

Looking at the Spring Boot docs I only found examples to use session with Redis, Is it possible to use it without Redis?
Fabio
  • 225
  • 1
  • 6
  • 10
16
votes
5 answers

Error with cookie-value when adding a new Spring Session

In my Spring Boot 1.4 based application I use Spring Session to store session data in the database with JDBC. This works fine with the default session. But when I want to add a new session (by adding ?_s=1 to the application url) I get the following…
yglodt
  • 13,807
  • 14
  • 91
  • 127
12
votes
1 answer

Using SpringSessionBackedSessionRegistry with Redis Session Repository

I am using Spring Security and Spring Session (v1.3.1) in my application. I would like to use SpringSessionBackedSessionRegistry as my Session Registry and Redis as my Session repository. The constructor for SpringSessionBackedSessionRegistry is as…
Brandon E Taylor
  • 24,881
  • 6
  • 47
  • 71
12
votes
5 answers

@EnableRedisHttpSession + Spring Boot ignoring server.session.timeout on application.yml

I have a project with Spring Boot 1.3.3 [another stuff] and Redis configurated to manage sessions, i.e., @EnableRedisHttpSession. The application works well and stores the information on Redis regularly. The problem that I'm facing is that,…
Fernando Barbeiro
  • 762
  • 4
  • 15
  • 33
11
votes
1 answer

How to use Spring Boot authentication with Redis session

I'm trying to learn Spring Boot by writing a simple REST application that would log users in (POST /login) and display info about current user (GET /). I'm using Redis for sessions. POST /login works as expected: it returns the principal and sets…
Dmitri Maltsev
  • 323
  • 1
  • 3
  • 10
11
votes
2 answers

Spring Session Data Redis - Get Valid Sessions, Current User from Redis Store

My question is, in distributed web application is it possible to get the valid sessions from Redis Store using RedisOperationSessionRepository. (I mean I don't want to write explicit code for putting it into Redis store and then later read it, I…
Shrikant Havale
  • 1,250
  • 1
  • 16
  • 36
10
votes
1 answer

Migrate user sessions from HttpSession to Spring redis session (Spring MVC app)

Recently we started using spring redis session as our session manager. We already have our application running in production for the last 8-10 months. There is a mobile app which uses this backend. When I change the session repository to spring…
Bijesh CHandran
  • 477
  • 1
  • 8
  • 22
10
votes
3 answers

Spring Zuul API Gateway with Spring Session / Redis Authenticate and Route in same Request

I have been really been searching high and low for the last few days on how to do this and have finally decided to admit defeat and ask for help, please!!! I have followed Dr Dave Syer's tutorial on Angular and Spring Security specifically the Zuul…
Justin Taylor
  • 173
  • 1
  • 2
  • 10
9
votes
1 answer

Expand Timeout using Spring Session (JDBC) on Spring Boot

I'm using Spring Boot and Spring Session to control an application that uses ReactJS as frontend. My problem is simple and I tried several ways to deal with without success. The React portion uses AJAX to call Spring REST services after the login…
9
votes
3 answers

Spring-Session with JDBC configuration: Table 'test.spring_session' doesn't exist

I try to run this example but without using Redis, instead with my local MySQL server. I have edited this spring boot app like this: Gradle: buildscript { repositories { mavenCentral() } dependencies { …
Tomasz Mularczyk
  • 34,501
  • 19
  • 112
  • 166
9
votes
3 answers

OAuth2ClientContext (spring-security-oauth2) not persisted in Redis when using spring-session and spring-cloud-security

Thanks a lot in advance for reading this question. Setup I am using: spring-security-oauth2:2.0.7.RELEASE spring-cloud-security:1.0.1.RELEASE spring-session:1.0.1.RELEASE and would have a question regarding the persistence of…
9
votes
2 answers

Spring Session and Spring Security

I have questions on the following areas: spring-session and spring-security. Spring Session I have a application protected with Spring Security through basic in-memory authentication as provided in the example sample. I see spring is creating…
gg_1234
  • 117
  • 1
  • 5
8
votes
1 answer

Why does Spring Security 6 not create sessions when authenticating with curl and basic auth?

I recently upgraded to Spring Security 6, and have found that authenticating using basic auth from JS or from curl no longer works but authenticating with basic auth using Java's HttpClient does work. My goal is to be able to authenticate with all…
Jason
  • 7,356
  • 4
  • 41
  • 48
8
votes
1 answer

Spring session with in memory store

Why does not spring.session.store-type has in memory option. ? Is there any way to use spring session with in memory option without writing my implementation of store ? I would like to use spring session for rest api with token @Bean public…
user1321466
  • 1,889
  • 2
  • 21
  • 29
1
2 3
49 50