【问题标题】:Spring boot stateless security with redis cache data使用 redis 缓存数据的 Spring Boot 无状态安全性
【发布时间】:2017-09-18 10:51:07
【问题描述】:

在做一些练习示例来学习 Spring 安全性时,我想出了一些以下用例。但我没有找到使用弹簧安全的最佳方法。有人可以帮我解决这个问题吗

我有 angularJs 应用程序,Spring boot 应用程序在不同的服务器上运行。在 redis 缓存中,我有以 gsid 为键的用户信息(角色和其他一些信息)。在每个休息电话中,我都将 gsid 作为 cookie 传递。现在我想通过在发送到 @Restcontroller 之前从 redis 缓存中获取用户信息来验证 Spring 安全过滤器中的每个请求。

使用 Spring Boot 安全性对请求进行身份验证和授权的最佳方法是什么。

【问题讨论】:

  • Google on spring security sample applications 你会得到很多但是用redis可能找不到很多。

标签: spring security spring-boot redis stateless


【解决方案1】:

使用spring-session with redis,它还提供与spring-security的集成。

【讨论】:

    猜你喜欢
    • 2018-04-21
    • 1970-01-01
    • 2019-02-27
    • 1970-01-01
    • 2022-01-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-21
    相关资源
    最近更新 更多