enable redis indexed web session
- update RemoteAuthentication to use user id as name - add EnableRedisIndexedWebSession to Application - remove redis namespace from application.yml
This commit is contained in:
@@ -5,11 +5,13 @@ import ltd.hlaeja.property.DeviceRegistryProperty
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties
|
||||
import org.springframework.boot.runApplication
|
||||
import org.springframework.session.data.redis.config.annotation.web.server.EnableRedisIndexedWebSession
|
||||
|
||||
@EnableConfigurationProperties(
|
||||
AccountRegistryProperty::class,
|
||||
DeviceRegistryProperty::class,
|
||||
)
|
||||
@EnableRedisIndexedWebSession
|
||||
@SpringBootApplication
|
||||
class Application
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ data class RemoteAuthentication(
|
||||
private var authenticated: Boolean = false,
|
||||
) : Authentication {
|
||||
|
||||
override fun getName(): String = "Hlaeja Account Registry"
|
||||
override fun getName(): String = remoteUserDetail.id.toString()
|
||||
|
||||
override fun getAuthorities(): MutableCollection<out GrantedAuthority> = authorities
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@ spring:
|
||||
version: "%APP_BUILD_OS_VERSION%"
|
||||
session:
|
||||
timeout: 60m
|
||||
redis:
|
||||
namespace: "spring:session:management"
|
||||
data:
|
||||
redis:
|
||||
port: 6379
|
||||
|
||||
Reference in New Issue
Block a user