关于 oauth2 jwt authentication.getPrincipal 获取的是用户名的问题
第一种方案重写转换类(DefaultUserAuthenticationConverter)public Map<String, ?> convertUserAuthentication(Authentication authentication) { Map<String, Object> map = new HashMap<>(1); //继承UserDetails的对象 Object o = authentication.
原创
2021-05-06 11:41:30 ·
4846 阅读 ·
3 评论