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

Authorization: Bearer XXX as well a Token? #84

Open
ghost opened this issue Aug 7, 2019 · 1 comment
Open

Authorization: Bearer XXX as well a Token? #84

ghost opened this issue Aug 7, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 7, 2019

It is a pretty common expectation that JWT's can be passed using the Bearer token approach. It is also recommended and the main source of info for JWT:

https://jwt.io

It is a common compliant our customers give us that they need to use Token instead of Bearer when using our API. They need to write more code to support it etc...

Would you accept pull requests to all both to be specified?

@wevre
Copy link

wevre commented Nov 3, 2021

You can accomplish this (at least, you can switch to "Bearer" instead of the default "Token") by using the :token-name option when setting up the back end.

(require '[buddy.auth.backends :as backends])
(def backend (backends/jws {:secret "<your secret>" :token-name "Bearer"}))
;;                                                  ^^^^^^^^^^^^^^^^^^^^

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

1 participant