Eve Negotiable authentication
Project description
eve-negotiable-auth
An auth module for Eve. Allows for easy configuration and handling of multiple auth schemes - including schemes like Digest which require "negotiation".
NegotiableAuth
is an abstract base class. It uses the authparser library, which parses the Authorization:
header and dispatches to handlers. As a result, there is only one function to override:
process_claims(claims, allowed_roles, resource, method)
This is where you will use the passed to set up the Eve authorization context (e.g. calling set_request_auth_value()
).
- claims - a dict of name-value pairs containing the claims provided by the scheme handlers, derived from parsing the
Authorization:
header - allowed_roles - the user's allowed roles, passed through from BasicAuth
- resource - the resource being requested
- method - the HTTP verb of the request
- Return True/False whether the user is authenticated.
When NegotiableAuth calls AuthParser, it passes the following kwargs:
get_user_record()
- passed through to the scheme's user_record_fn
- allowed_roles
- resource
- method
- request
get_challenge_header()
- passed through to the scheme's challenge_fn
- request
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for eve-negotiable-auth-0.9.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66fc8138d4977159e8a3cf0cf2bf04810adfb44444a3af5d6bc7c50fc5adceaf |
|
MD5 | 0b941d84ac51bc365a9575e13a9f74af |
|
BLAKE2b-256 | 4cc53e4a33c26f1d00bb4615e6ffabac2a78027eaaa8b650819ad76a61f61791 |
Hashes for eve_negotiable_auth-0.9.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e5178b6b880cd88bf563a0559e67d4d39738ed018114e353d35f82b582c1216 |
|
MD5 | 753598ba06035853b834d9dbe2a92021 |
|
BLAKE2b-256 | 6ed82d0725d6a31937d0d9def0ab8b148633aadda4e9748c20e64c2e6585711b |