spring-session

Hazelcast Spring Session SubZero(Kryo) EntryBackupProcessorImpl NullPointerException issue

被刻印的时光 ゝ 提交于 2019-12-11 10:01:40
问题 I am using hazelcast-3.11.2 and SubZero-0.9 as global serializer. I am trying to configure Spring Session using this example. When I have more than one node in cluster - I get next exception when trying to get session id: 2019-03-20 15:01:59.088 ERROR 13635 --- [ration.thread-3] c.h.m.i.operation.EntryBackupOperation : [x.x.x.x]:5701 [hazelcast-group] [3.11.2] null java.lang.NullPointerException: null at com.hazelcast.map.AbstractEntryProcessor$EntryBackupProcessorImpl.processBackup

How can i get currently authenticated user Principal with spring security and Redis in spring boot application

点点圈 提交于 2019-12-11 05:47:15
问题 I want to secure my services with spring security and Json Web Token(JWT) and also store logged users in redis with spring session.So when user sends login request i authenticate user and i send generated token back like below: public ResponseEntity<?> createAuthenticationToken(@RequestBody JwtAuthenticationRequest authenticationRequest, Device device) throws AuthenticationException { // Perform the security final Authentication authentication = authenticationManager.authenticate( new

spring-boot 1.3.0.RC1 : ClassCastException in getting oauth2 user info from session persisted in Redis

橙三吉。 提交于 2019-12-11 01:07:51
问题 I'm working with a spring-boot application having OAuth2 single sign-on (in development, but already working). and I changed session-store from Tomcat to Redis. Problem I got ClassCastException when I try to get my User object from SecurityContextHolder . Storing User object to UsernamePasswordAuthenticationToken @Service @Transactional public class MyTokenService implements ResourceServerTokenServices { @Setter private OAuth2RestOperations restTemplate; @Autowired ResourceServerProperties

Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration

独自空忆成欢 提交于 2019-12-10 13:25:41
问题 After adding 2 dependencies shown below to my application everything works fine my session data is written to my local redis server, but when i try to specify different address of redis server i got an error. I assume that error is connected with some dependencies problem, but i dont know how to tackle this issue. compile "org.springframework.boot:spring-boot-starter-data-redis-reactive:${springVersion}" compile "org.springframework.session:spring-session-data-redis:${springVersion}" Error

websocket sessions sample doesn't cluster.. spring-session-1.2.2

你。 提交于 2019-12-08 11:40:37
问题 I'm testing clustering of spring sessions websocket sample. I'm running the sample as described in docs: http://docs.spring.io/spring-session/docs/current/reference/html5/guides/websocket.html. Code from: https://github.com/spring-projects/spring-session/archive/1.2.2.RELEASE.zip. If I run the app on one Tomcat server, all works as expected. but If I run two apps on two servers all does not work. I start the app on each of two Tomcat servers at 8080 and 8090 and login to each. 8080 comes up

Spring Session without additional context initialization?

元气小坏坏 提交于 2019-12-08 10:52:09
问题 I'm trying to use the recently released Spring Session library to do external session management in Redis. I'm using this guide. When I try to start my server, I get this error: SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.IllegalStateException: Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in

Spring Session Basic Auth token passed as query parameter in Spring-Websocket

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 10:32:32
问题 Currently we have Rest app with Spring Boot, Spring Session (Redis) and Spring Security. We use basic auth. Now I would like to add websocket support. When client logs in successfully to other part of application, he gets x-auth-token. It is passed later as header, and it works. Then websocket client sends this token as query parameter to connect to service. We would like to make Spring Security and Spring Session accept token through query param in websocket connection. Is there any

Creating separate data source for my session spring using JDBC and spring data jpa in spring boot

限于喜欢 提交于 2019-12-08 06:11:17
问题 I am a newbie in spring-boot and i want to configure my spring session with jdbc using h2 database, but it does not create a database and table in my h2 embedded database, it creates it in the PostgreSQL, using the PostgreSQL data source i configured in my applications properties file. How do i make my spring app use my embedded h2 db for storing sessions only while not conflicting with the PostgreSQL data source for my JPA https://github.com/eshiett1995/SessionProject. i would love if

What is the function of Spring Session?

◇◆丶佛笑我妖孽 提交于 2019-12-08 05:27:08
问题 A simple question, what is the use of Spring session where I can do a login with session using spring security? What feature can spring session offer? 回答1: To put it simple, Spring Session project provides infrastructure for managing user's session. Most notably, this includes replacing the HttpSession implementation provided by your Servlet container (e.g. Tomcat) with an implementation provided by Spring Session which is then persisted using SessionRepository implementation of your choice

What is the function of Spring Session?

徘徊边缘 提交于 2019-12-08 03:09:27
A simple question, what is the use of Spring session where I can do a login with session using spring security? What feature can spring session offer? To put it simple, Spring Session project provides infrastructure for managing user's session. Most notably, this includes replacing the HttpSession implementation provided by your Servlet container (e.g. Tomcat) with an implementation provided by Spring Session which is then persisted using SessionRepository implementation of your choice (Redis, Gemfire, Hazelcast, JDBC, Mongo are supported backends in current 1.2.0.RELEASE ). This ensures your