Jojo老师,
我现在在自己写refresh token 的 endpoint, 但是当我验证了refresh token 的正确性后,怎么拿到authentication,然后用它来生成access token 啊?我的token 信息是按照视频里介绍的通过config tokenstore 直接存在 redis 里的,所以没有相关的user 信息,只有token 信息。当access token 失效后,redis 就移除了该token,这时,我怎么拿到user authentication 啊?我看到您写的 usercontroller里“/me”的方法中,您直接把Authentication user 传进去了。我也想试着这样做,可是,我的user信息是null。如果我不能用类似方法,我应该如何拿到authentication 呢?
Spring Security技术栈,REST风格开发常见接口,独立开发认证授权模块保证REST服务安全
了解课程