kepler.auth module¶
The module defines the permissions available in Kepler and provides some authentication functionality.
-
class
kepler.auth.
KeplerAuthentication
¶ Bases:
object
The class represents a Pyramid authentication policy for Kepler system.
-
authenticated_userid
(request)¶ The method returns the authenticated
userid
orNone
if no authenticated userid can be found.
-
effective_principals
(request)¶ The method returns a sequence representing the effective principals.
-
forget
(request)¶ The method returns a set of headers suitable for ‘forgetting’ the current user on subsequent requests.
-
remember
(request, principal, **kw)¶ The method returns a set of headers suitable for ‘remembering’ the principal named
principal
when set in a response.
-
unauthenticated_userid
(request)¶ The method returns the unauthenticated
userid
. The method performs the same duty asauthenticated_userid
but is permitted to return theuserid
based only on the data present in the request.
-
-
class
kepler.auth.
KeplerAuthorization
¶ Bases:
object
The class represents a Pyramid authorization policy for Kepler system.
-
permits
(context, principals, permission)¶ The method returns
True
, if any of theprincipals
is allowedpermission
in the currentcontext
, else the method returnsFalse
.
-
principals_allowed_by_permission
(context, permission)¶ The method is not used. It raises
NotImplementedError
as per Pyramid documentation.
-