pyramid_jwt icon indicating copy to clipboard operation
pyramid_jwt copied to clipboard

idea: use with pyramid_authstack

Open tripsolutions opened this issue 3 years ago • 0 comments

We're using a slightly modified version of pyramid_jwt as part of a stack defined using https://github.com/wichert/pyramid_authstack and I'm trying to create a minimal pull request for the functionality.

My question is, would it be acceptable to have the functions set_jwt_cookie_authentication_policy and set_jwt_authentication_policy also return the created policies so that we can register them in pyramid_authstack?

From what I can see calling get_claims (via registered property jwt_claims) or create_token (via registered method create_jwt_token) on a request that did not match the jwt policy should not be a problem, so the only issue that my PR should address is how to obtain the policy so it can be added to the stack.

tripsolutions avatar Mar 02 '21 20:03 tripsolutions