Skip to content

Verification of claims #23

Closed
Closed
@toonetown

Description

The way that the "auth" function of the code at https://github.com/auth0/nginx-jwt is pretty nice. It seems to me that this would be a nicer (and more flexible) alternative to the verification code that is currently being worked on.

Basically, you specify a table with claims you want to verify. Existence of a claim key requires the presence of it. The value of the claims can either be a string (in which case, it's matched against the string value in the payload), or a function which takes a single parameter (the value from the payload) and returns true or false.

It seems that the current validation of nbf and exp (and the grace period and issuers check) could be done using this mechanism instead, if it were available.

I actually have some code that does this, and am willing to put together a pull request if it would be something that is desired.

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