-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authorization doesn't work with empty oauth2 scopes #2150
Milestone
Comments
Sounds like a duplicate of #1329 |
As per: https://tools.ietf.org/html/rfc6749#section-3.3:
Not passing a scope should be allowed. Scopes should be always be present in the swagger specification, but it should be possible to let it be empty, indicating that the server must apply the default oauth scope. From what i know, this is a bug in the UI code, not in the spec. See PRs. |
Closed via #2176. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When reporting a bug, please provide the following details:
swagger-ui version
767a37c
a swagger file reproducing the issue
use a swagger.json with empty oauth2 scopes like this:
"securityDefinitions" : {
"oauth2scheme" : {
"type" : "oauth2",
"authorizationUrl" : "https://url/to/authorize",
"tokenUrl" : "https://url/to/token",
"flow" : "implicit",
"scopes" : { }
}
validation of model will always fail, because the validate function doesn't cope with empty scopes array.
bug or feature?
maybe do something like this instead:
The text was updated successfully, but these errors were encountered: