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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c56e41686717bd70b3b9630f28c579164599226be2272c2d406c0609ce84799b |
|
MD5 | 22bf44a9e41abd253b1269bebb7a4fdd |
|
BLAKE2b-256 | 38e6b2016e6f339b5123dff6d647a2a0798f47b3f8962ec7f203f4b5d45888b0 |