-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Hello guys!
In our private project we need to use different token names in the same auth strategy. So we made a patch for your code.
If you like, you can merge this feature to original project.
Unfortunately I cannot make MR, so I only can send you a link to repo: https://gitlab.com/hololoev/hapi-auth-bearer-token-token-multiname
Diffs:
accessTokenName (Default: 'access_token') - Rename token key e.g. 'new_name' would rename the token query parameter to /route1?new_name=1234. Alternatively can be assign as array of strings: accessTokenName: [ 'access_token', 'custom_access_token' ]
And:
tokenType (Default: 'Bearer') - Accept a custom token type e.g. Authorization: Basic 12345678. Alternatively can be assign as array of strings: accessTokenName: [ 'Bearer', 'Customkey' ]