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
0
votes
0 answers

Multiple Spring Security configurations for REST via BasicAuth vs. Session with CSRF

In am working on a Spring Boot (1.3.2) application which just serves Spring MVC REST controllers that are consumed by a JavaScript single page app (deployed standalone, not inside the boot jar). The setup uses Spring Security, Spring Session and has…
0
votes
2 answers

Spring Session not get list of all logged In Users in application

Here is my SecureConfig file, along with custom SessionRepository and custom username password authentication filter. @Bean(name = "sessionRegistry") public SessionRegistry sessionRegistry() { return new SessionRegistryImpl(); } @Bean public…
Ravi H
  • 596
  • 3
  • 23
0
votes
1 answer

First time hitting REST endpoint through ZUUL returns 403 but subsequent calls work

I'm literally running out of hair to tear out. I've tried every flavour of config and still no luck. I hit Zuul to access a microservice REST endpoint. The first time I hit it, i'm bounced with a 403, after that all is good and I can hit it to…
0
votes
1 answer

ClassCastException when saving object in Spring redis session

Using spring boot 1.3.0.RC1, we used @EnableRedisHttpSession to enable RedisHttpSession. We tried to save an object in session : ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes(); …
N. DAMMAK
  • 71
  • 1
  • 5
0
votes
0 answers

spring session with dropwizard

i am using the dropwizard framework for developing REST apis i have successfully managed to integrate Spring Security into the dropwizard project and it works like a charm. Unfortunately i have not been able to get Spring Session to work with…
austin
  • 1,171
  • 1
  • 13
  • 32
0
votes
0 answers

Spring Netflix Zuul: Authenticate and Route the same request

I have a bunch of services that sit behind a Zuul Edge Server. The Zuul Edge Server also performs authentication. The session is shared with all services using Spring Session. I want to be able to authenticate and route the request to a service in…
0
votes
1 answer

EnableRedisHttpSession fails with vaadin

Running this project http://github.com/khauser/microservices4vaadin, which shall act as a sample vaadin microservice structure with Oauth2.0 I'm having the problem that the vaadin Service could not read/deserialize the session entries from Redis.…
0
votes
1 answer

Do I need some special setting to use "Automatic Session Alias Inclusion"?

Currently I'm trying to make simple application that using spring session(with spring security on spring boot) it almost works well. but I'm stuck at one point spring session's guide said "Spring Session will automatically include the session alias…
Javvano
  • 969
  • 8
  • 16
0
votes
0 answers

Grails with Spring Security using Spring Session with Redis: ClassNotFoundException

I'm running Grails 2.5.0 using the Spring Security Core plugin. The setup for Spring Security is as vanilla as it gets (no custom filters, providers, userdetails services, etc.). We have tried to introduce Spring-Session with Redis by mimicking the…
rmlan
  • 4,387
  • 2
  • 21
  • 28
0
votes
2 answers

Session expiration management with Spring Session for a single page app

I use Spring Session and I am having issues with session management especially dealing with session expiration. The idea is to return a custom Http Header to the client e.g. X-Application-Session-Is-New if the session has expired. Here is what I…
balteo
  • 23,602
  • 63
  • 219
  • 412
0
votes
2 answers

Configure Cookie Domain in spring session

So I already success implement SSO using spring session and redis on development localhost domain. But when I deploy to server using two sub domain. login.example.com apps.example.com They always create new session Id on each sub domain. I already…
prptn
  • 299
  • 1
  • 6
  • 18
0
votes
1 answer

Spring session stored over DB + Spring security authentication, clustered enviroment

I have one application over spring 4, with spring security to the authentication, and spring session to share session on clustered enviroment. I was implement the sessionRepository from Spring Session to store the session on the database, so when I…
HolloW
  • 720
  • 11
  • 21
0
votes
2 answers

How to check the HttpSession exists in Filter

I am having a javax.servlet.Filter in which I want to redirect to login page if HttpSession is new and redirect to the logout page if HttpSession expired and to some other page if HttpSession is present. The login and logout pages are external…
Achaius
  • 5,904
  • 21
  • 65
  • 122
0
votes
1 answer

how can I configure RedisHttpSessionConfigure to fallback if redis is not online

I'm using spring-session + redis as documented here: http://docs.spring.io/spring-session/docs/current/reference/html5/guides/httpsession-xml.html How can I configure RedisHttpSessionConfigure such that for local development, redis is not needed and…
user2395365
  • 1,991
  • 4
  • 18
  • 34
0
votes
1 answer

How does http security hasRole() method work

I have developed a RESTful API in Spring which retrieves user info from a database (MongoDB) and returns that data to a client that consumes this REST API. But before the data is retrieved the REST API checks to see if the user is an admin or not.…
Kingamere
  • 9,496
  • 23
  • 71
  • 110