interface pyramid_authsanity.interfaces.IAuthSourceService[source]

Represents an authentication source.


Returns the opaque value that was stored.


List of HTTP headers to Vary the response by.


Returns any and all headers for forgetting the current requests value.


Returns any and all headers for remembering the value, as a list. Value is a standard Python type that shall be serializable using JSON.


interface pyramid_authsanity.interfaces.IAuthService[source]

Represents an authentication service. This service verifies that the users authentication ticket is valid and returns groups the user is a member of.

add_ticket(principal, ticket)

Add a new ticket for the principal. If there is a failure, due to a missing/non-existent principal, or failure to add ticket for principal, should raise an error

verify_ticket(principal, ticket)

Verify that the principal matches the ticket given.


Return the current user id, None, or raise an error. Raising an error is used when no attempt to verify a ticket has been made yet and signifies that the authentication policy should attempt to call verify_ticket


Returns the groups for the current user, as a list. Including the current userid in this list is not required, as it will be implicitly added by the authentication policy.


Remove a ticket for the current user. Upon success return True