Skip to content
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

Handling of relative paths in OAuth 2.0 AuthorizationUrl/TokenUrl on authorization actions #3992

Open
yewton opened this issue Dec 6, 2017 · 5 comments

Comments

@yewton
Copy link

yewton commented Dec 6, 2017

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

@Zachius
Copy link

Zachius commented May 30, 2018

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"

@yewton
Copy link
Author

yewton commented May 31, 2018

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

@uhrohraggy
Copy link

Is it likely we can get this merged in?

@pszalko
Copy link

pszalko commented Mar 16, 2020

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

@lostfields
Copy link

This is still a issue kind of, if you are leaving out the the domain path of the server url and keep it relative/absolute (eg just using / instead of https://exampe.com/) will a relative url for authorizationUrl and tokenUrl using the swagger explorer domain instead of the domain for the swagger definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants