Pyramid Security Extension
Project description
A simple pyramid extension to provides contexts based authentication policy. To register authentication methods:
from pyramid.security import remember, forget class Context(object): pass def authenticated_userid(request): return unauthenticated_userid(request) def unauthenticated_userid(request): "A dummy example" return request.POST.get('userid') def effective_principals(request): if unauthenticated_userid(request): return ['User'] return [] def includeme(config): from pyramid_contextauth import get_authentication_policy policy = get_authentication_policy(config) policy.register_context( Context, authenticated_userid, unauthenticated_userid, effective_principals, remember, forget )
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for pyramid_contextauth-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89d03b3a6a7af557a97f021428705d589b9336accdb3dff8c2b1196136e150f4 |
|
MD5 | bdb071c824e4f506e3e9f67ebd831963 |
|
BLAKE2b-256 | ba8ecc6fd87e72aa299de1809c1a6340981328d234ba6e61fbd7106404aac9f7 |