Skip to content
This repository was archived by the owner on May 1, 2018. It is now read-only.
This repository was archived by the owner on May 1, 2018. It is now read-only.

Non-uppercase scheme parameter results in failed permissions checks #13

Description

@bfin

Currently, any lowercase or mixed case scheme parameter passed to JWTAuthenticationPolicy() will fail checks because _get_params() applies the upper() method to the request's scheme name but not to the custom scheme name, to which it is compared.

Example:
With scheme = 'Bearer', all of these headers currently fail auth:
Authorization: Bearer token="..."
Authorization: bearer token="..."
Authorization: BEARER token="..."
But with scheme = 'BEARER', they all pass.

As the most commonly used scheme is (probably) the mixed cased 'Bearer', it should probably not automatically fail...grin.

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