pyramid_authsanity.interfaces
¶
SourceService¶
-
interface
pyramid_authsanity.interfaces.
IAuthSourceService
[source]¶ Represents an authentication source.
-
vary
¶ List of HTTP headers to Vary the response by.
-
get_value
()¶ Returns the opaque value that was stored.
-
headers_remember
(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.
-
headers_forget
()¶ Returns any and all headers for forgetting the current requests value.
-
AuthService¶
-
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.
-
userid
()¶ 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
-
groups
()¶ 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.
-
verify_ticket
(principal, ticket)¶ Verify that the principal matches the ticket given.
-
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
-
remove_ticket
(ticket)¶ Remove a ticket for the current user. Upon success return True
-