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

Method to set 'Api key authorization' #3010

Closed
supsup opened this issue May 1, 2017 · 4 comments
Closed

Method to set 'Api key authorization' #3010

supsup opened this issue May 1, 2017 · 4 comments

Comments

@supsup
Copy link

supsup commented May 1, 2017

v3

  1. user goes to http://petstore.swagger.io/
  2. user clicks authorize
  3. user scrolls down to 'Api key authorization'
  4. user enters value
  5. user submits form

Actual: Nothing wrong, I just want to do this with a method call instead of having to use a form.

Ideal flow:
Access to helper method like
ui.auth.apiKey = 'foobar'

@craigcoles
Copy link

@supsup It would be good to set an API Key from init, like oAuth.

@jodigiordano
Copy link

I have a similar use case.

My API has a simple token authentication scheme (X-Token in a HTTP header) and the Authorize button works fine.
My documentation is internal and I would like to add a dropdown list of all the available users to impersonate with a predefined token for each of them.
Then, when someone choose a user from the list, I want to call something like:

ui.auth.token = user.token

That way my team can quickly use the API locally with different users without going through the entire authentication workflow.

@shockey
Copy link
Contributor

shockey commented Mar 2, 2018

Closing in favor of #2915

@shockey shockey closed this as completed Mar 2, 2018
@lock
Copy link

lock bot commented Jul 2, 2019

Locking due to inactivity.

This is done to avoid resurrecting old issues and bumping long threads with new, possibly unrelated content.

If you think you're experiencing something similar to what you've found here: please open a new issue, follow the template, and reference this issue in your report.

Thanks!

@lock lock bot unassigned bodnia Jul 2, 2019
@lock lock bot locked and limited conversation to collaborators Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants