fietsboek.security module

Module implementing the user authentication.

class fietsboek.security.SecurityPolicy(cookie_secret)

Bases: object

Implementation of the Pyramid security policy.

authenticated_userid(request)

See pyramid.interfaces.ISecurityPolicy.authenticated_userid()

forget(request, **kw)

See pyramid.interfaces.ISecurityPolicy.forget()

identity(request)

See pyramid.interfaces.ISecurityPolicy.identity()

permits(request, context, permission)

See pyramid.interfaces.ISecurityPolicy.permits()

remember(request, userid, **kw)

See pyramid.interfaces.ISecurityPolicy.remember()

Return the headers for remembering the user using the cookie method.

This is used for the “Remember me” functionality, as the cookie doesn’t expire (unlike the session).

The parameters are the same as for remember().