Closed marcioaug closed 7 years ago
I guess UserInfoTokenServices
is completely not designed to handle client credentials tokens (which seems reasonable on the face of it). Maybe it should fail more spectacularly? Can you explain why you need to do this?
I'm facing the same issue, using the following setup : I have an API gateway based on spring cloud netflix / zuul and I need to check if a request is made by an end user or an application (using the client credentials flow). Currently, the Authentication
is always set as a user authentication.
Do I need to subclass UserInfoTokenServices
?
I'm on spring boot 1.4.2 and spring cloud Camden.SR7
@edp0 as mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Please ask your question on StackOverflow.
In UserInfoTokenService (org.springframework.boot.autoconfigure.security.oauth2.resource)
org.springframework.security.oauth2.provide.OAuth2Authentication:
Always sends the userAuthentication , even when the token is obtained by client_crendetials grant type. This causes a fail in OAuth2Authentication
Since the userAuthentication will never be null.