Skip to content

Why configure the JWT location statically? #26

Closed
@sisp

Description

@sisp

Hi,

I've been wondering whether there's a particular reason why you decided to have a configuration option that determines the location of the JWT when checking a request with jwt_required. Instead, wouldn't it be better to pass a list of locations to the decorator?

@jwt_required(['cookie', 'header'])
def view():
    ...

This decorator would look for a cookie first and, if there's no cookie with the JWT, also check the header. Of course, only checking one of the two would be possible, too, and there could be a configurable default location.

What do you think?

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