kepler.auth module¶
The module defines the permissions available in Kepler and provides some authentication functionality.
-
class
kepler.auth.KeplerAuthentication¶ Bases:
objectThe class represents a Pyramid authentication policy for Kepler system.
-
authenticated_userid(request)¶ The method returns the authenticated
useridorNoneif 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
principalwhen set in a response.
-
unauthenticated_userid(request)¶ The method returns the unauthenticated
userid. The method performs the same duty asauthenticated_useridbut is permitted to return theuseridbased only on the data present in the request.
-
-
class
kepler.auth.KeplerAuthorization¶ Bases:
objectThe class represents a Pyramid authorization policy for Kepler system.
-
permits(context, principals, permission)¶ The method returns
True, if any of theprincipalsis allowedpermissionin the currentcontext, else the method returnsFalse.
-
principals_allowed_by_permission(context, permission)¶ The method is not used. It raises
NotImplementedErroras per Pyramid documentation.
-