Closed nenaraab closed 5 years ago
@mwdb
Unfortunately your pull request does not fix the issue. It must be sth, that can be used as database entry for the Spring ACL tables, e.g. getLogonName()
.
merged into develop branch
see
https://github.com/SAP/cloud-security-xsuaa-integration/blob/master/spring-xsuaa/src/main/java/com/sap/cloud/security/xsuaa/token/Token.java
implements now org.springframework.security.core.userdetails.UserDetails
Problem
UserInfo
is set as Principle by theUserInfoAuthenticationToken
, which implementsorg.springframework.security.core.Authentication
.The Spring framework often calls
SecurityContextHolder.getContext().getAuthentication().getPrincipal()
and expects either a Principal of typeorg.springframework.security.core.userdetails.UserDetails
or expects (more implicitly) that thetoString()
method is implemented in such way, that it returns a (unique) userName...The simplest fix would be to let the
UserInfo
in the commons lib override thetoString()
method: