Search in sources :

Example 6 with SessionCreatedEvent

use of org.springframework.session.events.SessionCreatedEvent in project spring-session by spring-projects.

the class RedisOperationsSessionRepository method handleCreated.

private void handleCreated(Map<Object, Object> loaded, String channel) {
    String id = channel.substring(channel.lastIndexOf(":") + 1);
    Session session = loadSession(id, loaded);
    publishEvent(new SessionCreatedEvent(this, session));
}
Also used : SessionCreatedEvent(org.springframework.session.events.SessionCreatedEvent) Session(org.springframework.session.Session) MapSession(org.springframework.session.MapSession)

Aggregations

SessionCreatedEvent (org.springframework.session.events.SessionCreatedEvent)6 Session (org.springframework.session.Session)4 MapSession (org.springframework.session.MapSession)3 Test (org.junit.Test)2 UsernamePasswordAuthenticationToken (org.springframework.security.authentication.UsernamePasswordAuthenticationToken)2 Authentication (org.springframework.security.core.Authentication)2 SecurityContext (org.springframework.security.core.context.SecurityContext)2 SessionDestroyedEvent (org.springframework.session.events.SessionDestroyedEvent)2 Before (org.junit.Before)1 MockServletContext (org.springframework.mock.web.MockServletContext)1 ExpiringSession (org.springframework.session.ExpiringSession)1 RedisSession (org.springframework.session.data.redis.RedisOperationsSessionRepository.RedisSession)1 EnableRedisHttpSession (org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession)1 SessionDeletedEvent (org.springframework.session.events.SessionDeletedEvent)1 SessionExpiredEvent (org.springframework.session.events.SessionExpiredEvent)1