我制作了一个简单的应用程序,它使用带有 oauth/jwt 提供程序的 spring 安全性。我通过自定义 JwtAccessTokenConverter 在 jwt 令牌中添加了额外的信息,并且效果很好。
我的问题是如何在我的 Rest Controller 中获取这些额外信息。
这是我的测试:
@RequestMapping(value = "/test", produces = { "application/json" },method = RequestMethod.GET)
public String testMethod(OAuth2Authentication authentication,
OAuth2AccessToken token,
Principal user){
.....
Object a=token.getAdditionalInformation();
Object b=token.getValue();
...
}
Run Code Online (Sandbox Code Playgroud)
结果是:
一些额外的信息:
我希望使用 GitLens 来管理 git-flow 结构。GitLens 是否集成了此 Git 扩展?或者还有其他扩展吗?