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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5f545e8cc7e8f5c0895b6f1ab7750261e2cfe6482317c483c25411875b3221c |
|
MD5 | b612c6a96b90d0b4f898453c341bba16 |
|
BLAKE2b-256 | 2cdd7535ca2ff3d3658f93abb26cb2bddeeb4ab9b2053e81ae1be0ed0d34cfc0 |
Hashes for eve_negotiable_auth-0.9.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e22711795940cfd1a9345e1d7267eeaf081a33f4de67304b0394dbbb1b6ca4b0 |
|
MD5 | 71c3b23a6eef606aa33da6a4fe34e0ba |
|
BLAKE2b-256 | e72922ea51f34847c2c0955c9337bb736375367fde11ab3c8356e5d3ca272fb3 |