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

add auth token in header on swagger pages #82

Open
JosefAssadERST opened this issue Nov 8, 2022 · 3 comments
Open

add auth token in header on swagger pages #82

JosefAssadERST opened this issue Nov 8, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@JosefAssadERST
Copy link
Member

In the swagger pages you get a very helpful text field with a "copy" button for the curl calls corresponding to the swagger example calls. Right now we have to manually figure out what the HTTP header for the token is, and fetch the token by hand from another page, and add it to that curl command.

Surely we can override or extend the swagger framework to inject that so the copied command can be invoked directly?

It's not a big deal but it's a fairly obvious and recurring paper cut.

@iszulcdeepsense
Copy link
Collaborator

Good reasoning.

Just want to note that in the current design, PUB is the authentication gateway and it's the last place where the auth token is present. So Fatman may not know who was calling and what token should be displayed. The token can't be rendered at page in advance since we don't know which user or ESC will be calling it, so it ought to be taken from the request

@JosefAssadERST
Copy link
Member Author

Yeah I think we discussed before and it was hard for some reason and that's entirely fair. I wanted to note the paper cut though so in the worst case we're aware.

@iszulcdeepsense iszulcdeepsense added the enhancement New feature or request label Feb 2, 2023
@LookACastle
Copy link
Collaborator

I've been looking at this for a little while, and I don't necessarily think it is feasible to fix on our end. The documentation says cookie authentication doesn't work for "try it out" requests - which is what we're dealing with here.

If we can't render it in advance and can't use cookies to persist the information, I'm at a loss for how we exactly are supposed to get the data from one end to the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants