swagger-api / swagger-api/swagger-ui
Handling of relative paths in OAuth 2.0 AuthorizationUrl/TokenUrl on authorization actions
Open
@shockey is already working on this.
Since Dec 7, 2017.
cat: auth
type: bug
version: 3.x
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
| Q | A |
|---|---|
| Bug or feature request? | Bug |
| Which Swagger/OpenAPI version? | 3.0 |
| Which Swagger-UI version? | 3.x |
| How did you install Swagger-UI? | http://petstore.swagger.io/ or https://editor.swagger.io/ |
| Which browser & version? | Chrome 62 |
| Which operating system? | Sierra |
Demonstration API definition
Configuration (browser query string, constructor, config.yaml)
Default.
Expected Behavior
Relative paths in AuthorizationUrl or TokenUrl in securitySchemes are treated as relative to the API server URL.
Current Behavior
They are treated as relative to the UI/Editor's server URL.
Possible Solution
- Fix URL here: https://github.com/swagger-api/swagger-ui/blob/v3.6.0/src/core/plugins/auth/actions.js#L145
Context
- We are going to host Web APIs and also OAuth 2.0 authorization endpoints on the same server(domain)
- Original post: https://groups.google.com/d/msg/swagger-swaggersocket/IS6xNL5AEjQ/YfE35QIMAQAJ
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.