pypicloud.auth module¶
Utilities for authentication and authorization
- class pypicloud.auth.PypicloudSecurityPolicy[source]¶
Bases:
object
- authenticated_userid(request)[source]¶
Return a userid string identifying the trusted and verified user, or
None
if unauthenticated.If the result is
None
, thenpyramid.request.Request.is_authenticated
will returnFalse
.
- forget(request, **kw)[source]¶
Return a set of headers suitable for ‘forgetting’ the current user on subsequent requests. An individual security policy and its consumers can decide on the composition and meaning of
**kw
.
- identity(request)[source]¶
Return the identity of the current user. The object can be of any shape, such as a simple ID string or an ORM object.