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

Bearer Token Support Please! #133

Open
luismetzger opened this issue Apr 2, 2020 · 1 comment
Open

Bearer Token Support Please! #133

luismetzger opened this issue Apr 2, 2020 · 1 comment

Comments

@luismetzger
Copy link

luismetzger commented Apr 2, 2020

Would love to have JWT bearer token support for this. Need to add authentication but keep getting an error message in the pop-up.

Thanks!

@rgpass
Copy link

rgpass commented Apr 11, 2020

@luismetzger I got it to work using a Bearer token. Hopefully this helps.

# In your `swagger_root` block
security_definition :api_key do
  key :type, :apiKey
  key :name, :Authorization
  key :in, :header
end

# In your `swagger_path` block
security do
  key :api_key, []
end

Then in Swagger UI, I click "Authorize" and drop the whole Authorization header value in (such as Bearer mytokenhere.

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

No branches or pull requests

2 participants