Swagger-ui: Handling of relative paths in OAuth 2.0 AuthorizationUrl/TokenUrl on authorization actions

Created on 6 Dec 2017  路  4Comments  路  Source: swagger-api/swagger-ui

| 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


Gist: https://gist.githubusercontent.com/yewton/b4bc323992c685962b1e8f071a3eebaa/raw/748e99b95f1a543ac65741d2c57afa194a9e6617/openapi.yml

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


Context


auth bug 3.x

Most helpful comment

@Zachius We want a URL to be relative to the API server URL, not to the UI/Editor's server URL.

All 4 comments

As I understand it this is the desired behaviour. If you don't want a relative url, ensure that the token or authorisation url begins with '/'. i.e. "/oauth/token"

@Zachius We want a URL to be relative to the API server URL, not to the UI/Editor's server URL.

Is it likely we can get this merged in?

@shockey Any update on this issue? Can we expect the PR to be merged?

Was this page helpful?
0 / 5 - 0 ratings