Baeldung / spring-security-oauth

Just Announced - "Learn Spring Security OAuth":
http://bit.ly/github-lsso
MIT License
1.99k stars 1.95k forks source link

Not all endpoints testable with swagger #84

Closed Aehrraid closed 4 years ago

Aehrraid commented 6 years ago

I am experiencing unexpected behaviour using Swagger-UI. This might not be a bug on your side.

What I did:

Yields

curl -X GET "http://localhost:8082/spring-security-oauth-resource/users/extra" -H  "accept: */*"

and

401

Error: Response body

{   
  "error": "unauthorized",   
  "error_description": "Full authentication is required to access this resource"
}

Using OAuth2-Authentication in Postman works for this endpoint, because the Authorization-Header is set to "Bearer [token]" and yields:

{
  "user_name": "admin",
  "organization": "adminQAZa",
  "authorities": [
    "ROLE_ADMIN"
  ],
  "jti": "46abcc9a-70b0-44a3-b513-f04531799954"
}
Aehrraid commented 6 years ago

Fix with https://github.com/Baeldung/spring-security-oauth/pull/85

ghost commented 4 years ago

Closing this issue as it's not a bug on our side. Right now we are not looking at Swagger-ui integration in this project.