Questions tagged [spring-session]
Spring Session provides a common infrastructure for managing user’s session information.
spring-session
349
questions with no upvoted or accepted answers
11
votes
2
answers
7k
views
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 ...
7
votes
1
answer
5k
views
Authentication should not be null in unit tests with spring-session
I have a spring boot (version 1.5.9.RELEASE) application which uses spring-session to store sessions on Redis. It also uses spring-security to authenticate users. When running the application, after a ...
7
votes
0
answers
2k
views
How do you copy stomp websocket sessions to redis in spring when you are using REST API and JWT
I am building a small websocket project and secured by JWT token mechanism and I would like to store websocket sessions in redis not local memory.
@Override
protected void configureStompEndpoints(...
7
votes
1
answer
379
views
Centralize session management to other Springboot applications
I have some applications with Spring Boot, Spring Security, Spring Sessions and Spring Redis.
One of my applications (I will call it "Permissions") is responsible for providing a login service to all ...
7
votes
2
answers
4k
views
Spring Security SAML with Spring session
I am using OpenAM as my IDP and my SP (an angular2 SPA) is based on the example shared at: https://github.com/vdenotaris/spring-boot-security-saml-sample
After authentication, my webapp is supposed ...
6
votes
0
answers
658
views
How to fix "Session was invalidated" Exception?
I have an endpoint (/logout) that invalidate the session manually by calling HttpSession#invalidate(). Sometimes i got the following exception (Within 1000 request it happens about a dozen times):
...
6
votes
0
answers
3k
views
Maintain user's session (HttpSession) after login in Spring Boot application
I'm creating a simple hotel reservation web application in Spring. Currently, I'm building the actual implementation of booking functionality, employing HttpSession to store data between requests to ...
6
votes
0
answers
2k
views
How to persist spring sessions into custom back-end data store
I have a spring MVC web application, I have java classes that I have annotated with @Scope("session") and currently running it on tomcat. The classes annotated with the scope store user information ...
6
votes
1
answer
4k
views
How to set order for SessionRepositoryFilter?
I am evaluating spring-session with my web application. During the very first request to the web app, multiple httpsession is being created for a single client. After debugging I found that the ...
5
votes
2
answers
1k
views
Can Spring Session be turned off in Spring Boot 3?
In my Spring Boot 2.7.4 project, I use Spring Session with Redis by including these dependencies:
<dependency>
<groupId>org.springframework.boot</groupId>
...
5
votes
0
answers
2k
views
Get current session in spring boot application that utilize spring-session backed by MongoDB
I have an instance of HandlerInterceptorAdapter that intercept request to check locale...
public class LocaleControllerInterceptor extends HandlerInterceptorAdapter {
@Override
...
4
votes
0
answers
621
views
Vaadin login page conitiously and automatically reloads with spring-session-jdbc
I've just started to dive into Vaadin UI development, please excuse me in case of any silly mistakes. Can someone please help?
I built a simple sbring-boot application, that uses spring-security for ...
4
votes
0
answers
382
views
Programatically expired spring session causes the rest-api user to face unexpected response
There is an adminUser A who can make the session of another rest-api user B expired.
Collection<SessionInformation> usersSessions = sessionRegistry.getAllSessions(user, true);
usersSessions....
4
votes
0
answers
953
views
How to define a custom grant type in a Spring Security Oauth2 client?
I have a working api-gateway application built on spring-boot 2.2, which is an Oauth2 client supporting authorization-code grant flow. It is built using spring-boot @EnableOAuth2Sso, which will create ...
4
votes
1
answer
267
views
Is there a technique to delay session creation until a user successfully logs in?
We have a spring-boot application that uses WebSecurityConfigurerAdapter.configure() to handle form login via
http.formLogin().loginPage("/login")
When the browser hits any GET mappings (/ typically)...