Skip to content

New feature: multiple auth token names #213

@hololoev

Description

@hololoev

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' ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions