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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73d65b31411215bb42b19280b51eeec84399e04d4fa8f4717cfc4a3ebc791b12 |
|
MD5 | 60f6f9f112614a1ecdbd826058a6d9f5 |
|
BLAKE2b-256 | de291c10bead4fc9b1302bff9a2dc03225e69015993643030d793e18a878e8a9 |
Hashes for eve_negotiable_auth-0.9.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 469b3ce8e91816d22d15c305f47d68962584b9ba5c292840afb777705051d3ff |
|
MD5 | e8689697608e50b833ba84716056de7f |
|
BLAKE2b-256 | 1a2e6c374bb305e9a2a87f1654c41e16dd86c06bdd2cc5640916b8eab2d3bb5a |