Index of the authkit module
-
m
authkit
...
- AuthKit - authentication and authorisation facilities
-
m
authorize
...
- Please update your code to use authkit.authorize.wsgi_adaptors instead of this
module.
-
m
wsgi_adaptors
...
- Authorization objects for checking permissions
-
C
NotAuthorizedError
...
- Raised when a permission check fails because the user is not authorized.
-
C
PermissionSetupError
...
-
C
NonConformingPermissionError
...
- Raised when a custom permission object is not behaving in a compliant way
-
C
PermissionError
...
- Base class from which NotAuthenticatedError and NotAuthorizedError
are inherited.
-
C
NotAuthenticatedError
...
- Raised when a permission check fails because the user is not authenticated.
-
f
authorize
...
- This is an authorize decorator (requires Python 2.4) which can be used
to decorate a function. It takes the permission to check as its only
argument.
-
f
middleware
...
- Returns an WSGI app wrapped in authorization middleware and on each request
will check the permission specified.
-
f
authorized
...
-
f
authorize_request
...
- This function can be used within a controller action to ensure that no code
after the function call is executed if the user doesn't pass the permission
check specified by permission.
-
m
pylons_adaptors
...
- Pylons specific code to facilitate using AuthKit with Pylons
-
a
request
...
-
f
authorize
...
- This is a decorator which can be used to decorate a Pylons controller action.
It takes the permission to check as the only argument and can be used with
all types of permission objects.
-
f
authorized
...
- Similar to the authorize_request() function with no access to the
request but rather than raising an exception to stop the request if a
permission check fails, this function simply returns False so that you
can test permissions in your code without triggering a sign in. It can
therefore be used in a controller action or template.
-
f
authorize_request
...
- This function can be used within a controller action to ensure that no code
after the function call is executed if the user doesn't pass the permission
check specified by permission.
-
m
authenticate
...
- Authentication middleware
-
a
log
...
-
a
no_authkit_users_in_environ
...
-
C
AddToEnviron
...
- Simple middleware which adds a key to the environ dictionary.
-
C
RequireEnvironKey
...
-
C
AuthKitAuthHandler
...
- The base class for all middleware responsible for handling
authentication and setting whatever needs to be set so that the
AuthKitUserSetter middleware can set REMOTE_USER on subsequent
requests. AuthKitAuthHandler``s only get inserted into the
middleware stack if an appropriate status code (as set in the
``authkit.setup.intercept config option) is intercepted by the
authentication middleware.
-
C
AddDictToEnviron
...
- Simple middleware which adds the values of a dict to the environ.
-
C
AuthKitUserSetter
...
- The base class for all middleware responsible for attempting to set
REMOTE_USER on each request. The class is overridden by the induvidual
handlers.
-
f
get_methods
...
- Get a dictionary of the available method entry points.
-
f
load_config
...
-
f
valid_password
...
- A function which can be used with the basic and form authentication
methods to validate a username and passowrd.
-
f
swap_underscore
...
-
f
load_method
...
-
f
strip_base
...
-
f
get_template
...
- Another utility method to reduce code duplication. This function parses a
template from one of the available template options:
-
f
digest_password
...
- This is similar to valid_password() but is used with the digest
authentication method and rather than checking a username and password and
returning True or False it takes the realm and username as input,
looks up the correct password and and returns a digest by calling the
authkit.authenticate.digest.digest_password() function with the
parameters realm, username and password respectively. The
digest returned is then compared with the one submitted by the browser.
-
f
sample_app
...
- A sample WSGI application that returns a 401 status code when the path
/private is entered, triggering the authenticate middleware to
prompt the user to sign in.
-
f
middleware
...
- This function sets up the AuthKit authenticate middleware and its use and
options are described in detail in the AuthKit manual.
-
f
get_authenticate_function
...
- Sets up the users object, adds the middleware to add the users object
to the environ and then returns authenticate methods to check a password
and a digest.
-
m
digest
...
- HTTP digest authentication middleware
-
m
redirect
...
- Redirect middleware to redirect the browser to a different URL for sign in
-
m
open_id
...
- Highly flexible OpenID based authentication middleware
-
m
basic
...
- HTTP basic authentication middleware
-
m
forward
...
- Internal forward middleware for manual authentication handling
-
m
form
...
- Form and cookie based authentication middleware
-
m
sso
...
- Authenticate Single Sign-On Middleware
-
m
cas
...
- CAS 1.0 and 2.0 SSO Implementation
-
m
api
...
- SSO API's
-
m
cookie
...
- Cookie handling based on paste.auth.auth_tkt but with some bug fixes and
improvements
-
m
multi
...
- Middleware that can dynamically change the stack based on status or headers
-
m
users
...
- Objects representing users, their passwords, roles and groups
-
C
Users
...
- Base class from which all other Users classes should be derived.
-
f
user_password
...
- Returns the password associated with the user or None if no password exists.
Raises an exception is the user doesn't exist.
-
f
user_add_role
...
- Sets the user's role to the lowercase of role. If the role doesn't exist and add_if_necessary is True the role will also be added. Otherwise an AuthKitNoSuchRoleError will be raised.
Raises an exception if the user doesn't exist.
-
f
__init__
...
-
f
user_set_username
...
- Sets the user's username to the lowercase of new_username.
Raises an exception if the user doesn't exist or if there is already a user with the username specified by new_username.
-
f
group_create
...
- Add a new group to the system
-
f
user_set_group
...
- Sets the user's group to the lowercase of group or None. If the group doesn't exist and add_if_necessary is True the group will also be added. Otherwise an AuthKitNoSuchGroupError will be raised.
Raises an exception if the user doesn't exist.
-
f
user_remove_role
...
- Removes the role from the user specified by username. Raises an exception if the user doesn't exist.
-
f
user_roles
...
- Returns a list of all the role names for the given username ordered alphabetically. Raises an exception if
the username doesn't exist.
-
f
user_remove_group
...
- Sets the group to None for the user specified by username. Raises an exception if the user doesn't exist.
-
f
role_delete_cascade
...
- Remove the role specified and remove the role from any users who used it
-
f
group_delete
...
- Remove the group specified. Rasies an exception if the group is still in use.
To delete the group and remove it from all existing users use group_delete_cascade()
-
f
list_roles
...
- Returns a lowercase list of all role names ordered alphabetically
-
f
group_delete_cascade
...
- Remove the group specified and remove the group from any users who used it
-
f
list_groups
...
- Returns a lowercase list of all groups ordered alphabetically
-
f
user
...
- Returns a dictionary in the following format:
-
f
user_exists
...
- Returns True if a user exists with the given username, False otherwise. Usernames are case insensitive.
-
f
user_create
...
- Create a new user with the username, password and group name specified.
-
f
role_exists
...
- Returns True if the role exists, False otherwise. Roles are case insensitive.
-
f
user_delete
...
- Remove the user with the specified username
-
f
group_exists
...
- Returns True if the group exists, False otherwise. Groups are case insensitive.
-
f
user_has_role
...
- Returns True if the user has the role specified, False otherwise. Raises an exception if the user doesn't exist.
-
f
list_users
...
- Returns a lowecase list of all usernames ordered alphabetically
-
f
role_delete
...
- Remove the role specified. Rasies an exception if the role is still in use.
To delete the role and remove it from all existing users use role_delete_cascade()
-
f
user_has_password
...
- Returns True if the user has the password specified, False otherwise. Passwords are case sensitive.
Raises an exception if the user doesn't exist.
-
f
user_has_group
...
- Returns True if the user has the group specified, False otherwise. The value for group can be None to test that the user doesn't belong to a group. Raises an exception if the user doesn't exist.
-
f
role_create
...
- Add a new role to the system
-
C
AuthKitNoSuchRoleError
...
-
C
UsersFromString
...
- A Users class which cbtains user information from a string with lines
formatted as` username1:password1:group role1, role2 etc where
group is optional and zero or more roles can exist.
-
f
user_password
...
- Returns the password associated with the user or None if no password exists.
Raises an exception is the user doesn't exist.
-
f
user_group
...
- Returns the group associated with the user or None if no group is associated.
Raises an exception is the user doesn't exist.
-
f
user_add_role
...
- Sets the user's role to the lowercase of role. If the role doesn't exist and add_if_necessary is True the role will also be added. Otherwise an AuthKitNoSuchRoleError will be raised.
Raises an exception if the user doesn't exist.
-
f
__init__
...
-
f
user_set_username
...
- Sets the user's username to the lowercase of new_username.
Raises an exception if the user doesn't exist or if there is already a user with the username specified by new_username.
-
f
group_create
...
- Add a new group to the system
-
f
user_set_group
...
- Sets the user's group to the lowercase of group or None. If the group doesn't exist and add_if_necessary is True the group will also be added. Otherwise an AuthKitNoSuchGroupError will be raised.
Raises an exception if the user doesn't exist.
-
f
user_remove_role
...
- Removes the role from the user specified by username. Raises an exception if the user doesn't exist.
-
f
user_roles
...
- Returns a list of all the role names for the given username ordered alphabetically. Raises an exception if
the username doesn't exist.
-
f
user_remove_group
...
- Sets the group to None for the user specified by username. Raises an exception if the user doesn't exist.
-
f
role_delete_cascade
...
- Remove the role specified and remove the role from any users who used it
-
f
group_delete
...
- Remove the group specified. Rasies an exception if the group is still in use.
To delete the group and remove it from all existing users use group_delete_cascade()
-
f
list_roles
...
- Returns a lowercase list of all role names ordered alphabetically
-
f
group_delete_cascade
...
- Remove the group specified and remove the group from any users who used it
-
f
list_groups
...
- Returns a lowercase list of all groups ordered alphabetically
-
f
user
...
- Returns a dictionary in the following format:
-
f
user_exists
...
- Returns True if a user exists with the given username, False otherwise. Usernames are case insensitive.
-
f
user_create
...
- Create a new user with the username, password and group name specified.
-
f
user_delete
...
- Remove the user with the specified username
-
f
group_exists
...
- Returns True if the group exists, False otherwise. Groups are case insensitive.
-
f
user_has_role
...
- Returns True if the user has the role specified, False otherwise. Raises an exception if the user doesn't exist.
-
f
list_users
...
- Returns a lowecase list of all usernames ordered alphabetically
-
f
role_delete
...
- Remove the role specified. Rasies an exception if the role is still in use.
To delete the role and remove it from all existing users use role_delete_cascade()
-
f
user_has_password
...
- Passwords are case sensitive.
Returns True if the user has the password specified, False otherwise.
Raises an exception if the user doesn't exist.
-
f
user_has_group
...
- Returns True if the user has the group specified, False otherwise. Raises an exception if the user doesn't exist.
-
f
role_create
...
- Add a new role to the system
-
C
AuthKitError
...
-
C
UsersReadOnly
...
- Like the Users class except that user information is read only. All the information
is obtained from the attributes self.usernames, self.passwords, self.roles, self.groups
which are expected to be setup in __init__().
-
f
user_password
...
- Returns the password associated with the user or None if no password exists.
Raises an exception is the user doesn't exist.
-
f
user_group
...
- Returns the group associated with the user or None if no group is associated.
Raises an exception is the user doesn't exist.
-
f
user_add_role
...
- Sets the user's role to the lowercase of role. If the role doesn't exist and add_if_necessary is True the role will also be added. Otherwise an AuthKitNoSuchRoleError will be raised.
Raises an exception if the user doesn't exist.
-
f
__init__
...
-
f
user_set_username
...
- Sets the user's username to the lowercase of new_username.
Raises an exception if the user doesn't exist or if there is already a user with the username specified by new_username.
-
f
group_create
...
- Add a new group to the system
-
f
user_set_group
...
- Sets the user's group to the lowercase of group or None. If the group doesn't exist and add_if_necessary is True the group will also be added. Otherwise an AuthKitNoSuchGroupError will be raised.
Raises an exception if the user doesn't exist.
-
f
user_remove_role
...
- Removes the role from the user specified by username. Raises an exception if the user doesn't exist.
-
f
user_roles
...
- Returns a list of all the role names for the given username ordered alphabetically. Raises an exception if
the username doesn't exist.
-
f
user_remove_group
...
- Sets the group to None for the user specified by username. Raises an exception if the user doesn't exist.
-
f
role_delete_cascade
...
- Remove the role specified and remove the role from any users who used it
-
f
group_delete
...
- Remove the group specified. Rasies an exception if the group is still in use.
To delete the group and remove it from all existing users use group_delete_cascade()
-
f
list_roles
...
- Returns a lowercase list of all role names ordered alphabetically
-
f
group_delete_cascade
...
- Remove the group specified and remove the group from any users who used it
-
f
list_groups
...
- Returns a lowercase list of all groups ordered alphabetically
-
f
user
...
- Returns a dictionary in the following format:
-
f
user_exists
...
- Returns True if a user exists with the given username, False otherwise. Usernames are case insensitive.
-
f
user_create
...
- Create a new user with the username, password and group name specified.
-
f
role_exists
...
- Returns True if the role exists, False otherwise. Roles are case insensitive.
-
f
user_delete
...
- Remove the user with the specified username
-
f
group_exists
...
- Returns True if the group exists, False otherwise. Groups are case insensitive.
-
f
user_has_role
...
- Returns True if the user has the role specified, False otherwise. Raises an exception if the user doesn't exist.
-
f
list_users
...
- Returns a lowecase list of all usernames ordered alphabetically
-
f
role_delete
...
- Remove the role specified. Rasies an exception if the role is still in use.
To delete the role and remove it from all existing users use role_delete_cascade()
-
f
user_has_password
...
- Passwords are case sensitive.
Returns True if the user has the password specified, False otherwise.
Raises an exception if the user doesn't exist.
-
f
user_has_group
...
- Returns True if the user has the group specified, False otherwise. Raises an exception if the user doesn't exist.
-
f
role_create
...
- Add a new role to the system
-
C
AuthKitNotSupportedError
...
-
C
AuthKitNoSuchGroupError
...
-
C
AuthKitNoSuchUserError
...
-
C
UsersFromFile
...
- A Users class with the same implementation as UsersFromString except that
user information is obtained from a file. The file should contain user information
in the same format as the string accepted for UsersFromString.
-
f
user_password
...
- Returns the password associated with the user or None if no password exists.
Raises an exception is the user doesn't exist.
-
f
user_group
...
- Returns the group associated with the user or None if no group is associated.
Raises an exception is the user doesn't exist.
-
f
user_add_role
...
- Sets the user's role to the lowercase of role. If the role doesn't exist and add_if_necessary is True the role will also be added. Otherwise an AuthKitNoSuchRoleError will be raised.
Raises an exception if the user doesn't exist.
-
f
__init__
...
-
f
user_set_username
...
- Sets the user's username to the lowercase of new_username.
Raises an exception if the user doesn't exist or if there is already a user with the username specified by new_username.
-
f
group_create
...
- Add a new group to the system
-
f
user_set_group
...
- Sets the user's group to the lowercase of group or None. If the group doesn't exist and add_if_necessary is True the group will also be added. Otherwise an AuthKitNoSuchGroupError will be raised.
Raises an exception if the user doesn't exist.
-
f
user_remove_role
...
- Removes the role from the user specified by username. Raises an exception if the user doesn't exist.
-
f
user_roles
...
- Returns a list of all the role names for the given username ordered alphabetically. Raises an exception if
the username doesn't exist.
-
f
user_remove_group
...
- Sets the group to None for the user specified by username. Raises an exception if the user doesn't exist.
-
f
role_delete_cascade
...
- Remove the role specified and remove the role from any users who used it
-
f
group_delete
...
- Remove the group specified. Rasies an exception if the group is still in use.
To delete the group and remove it from all existing users use group_delete_cascade()
-
f
list_roles
...
- Returns a lowercase list of all role names ordered alphabetically
-
f
group_delete_cascade
...
- Remove the group specified and remove the group from any users who used it
-
f
list_groups
...
- Returns a lowercase list of all groups ordered alphabetically
-
f
user
...
- Returns a dictionary in the following format:
-
f
user_exists
...
- Returns True if a user exists with the given username, False otherwise. Usernames are case insensitive.
-
f
user_create
...
- Create a new user with the username, password and group name specified.
-
f
role_exists
...
- Returns True if the role exists, False otherwise. Roles are case insensitive.
-
f
user_delete
...
- Remove the user with the specified username
-
f
group_exists
...
- Returns True if the group exists, False otherwise. Groups are case insensitive.
-
f
user_has_role
...
- Returns True if the user has the role specified, False otherwise. Raises an exception if the user doesn't exist.
-
f
list_users
...
- Returns a lowecase list of all usernames ordered alphabetically
-
f
role_delete
...
- Remove the role specified. Rasies an exception if the role is still in use.
To delete the role and remove it from all existing users use role_delete_cascade()
-
f
user_has_password
...
- Passwords are case sensitive.
Returns True if the user has the password specified, False otherwise.
Raises an exception if the user doesn't exist.
-
f
user_has_group
...
- Returns True if the user has the group specified, False otherwise. Raises an exception if the user doesn't exist.
-
f
role_create
...
- Add a new role to the system
-
f
parse
...
- Parses the user data
-
f
md5
...
-
m
sqlalchemy_driver
...
-
a
NULLTYPE
...
-
a
default_metadata
...
-
a
EXT_PASS
...
-
C
UsersFromDatabase
...
- Database Version
-
f
user_password
...
- Returns the password associated with the user or None if no
password exists. Raises an exception is the user doesn't exist.
-
f
user_group
...
- Returns the group associated with the user or None if no group is
associated. Raises an exception is the user doesn't exist.
-
f
user_add_role
...
- Sets the user's role to the lowercase of role. If the role doesn't
exist and add_if_necessary is True the role will also be
added. Otherwise an AuthKitNoSuchRoleError will be raised. Raises
an exception if the user doesn't exist.
-
f
__init__
...
-
f
user_set_username
...
- Sets the user's username to the lowercase of new_username.
Raises an exception if the user doesn't exist or if there is already
a user with the username specified by new_username.
-
f
group_create
...
- Add a new group to the system
-
f
user_set_group
...
- Sets the user's group to the lowercase of group or None. If
the group doesn't exist and add_if_necessary is True the
group will also be added. Otherwise an AuthKitNoSuchGroupError
will be raised. Raises an exception if the user doesn't exist.
-
f
user_remove_role
...
- Removes the role from the user specified by username. Raises
an exception if the user doesn't exist.
-
f
user_roles
...
- Returns a list of all the role names for the given username ordered
alphabetically. Raises an exception if the username doesn't exist.
-
f
user_remove_group
...
- Sets the group to None for the user specified by username.
Raises an exception if the user doesn't exist.
-
f
group_delete
...
- Remove the group specified. Rasies an exception if the group is still in use.
To delete the group and remove it from all existing users use group_delete_cascade()
-
f
list_roles
...
- Returns a lowercase list of all roll names ordered alphabetically
-
f
list_groups
...
- Returns a lowercase list of all groups ordered alphabetically
-
f
user_exists
...
- Returns True if a user exists with the given username, False
otherwise. Usernames are case insensitive.
-
f
user_create
...
- Create a new user with the username, password and group name specified.
-
f
role_exists
...
- Returns True if the role exists, False otherwise. Roles are
case insensitive.
-
f
user_delete
...
- Remove the user with the specified username
-
f
group_exists
...
- Returns True if the group exists, False otherwise. Groups
are case insensitive.
-
f
update_model
...
-
f
user_has_role
...
- Returns True if the user has the role specified, False
otherwise. Raises an exception if the user doesn't exist.
-
f
list_users
...
- Returns a lowecase list of all usernames ordered alphabetically
-
f
role_delete
...
- Remove the role specified. Rasies an exception if the role is still in use.
To delete the role and remove it from all existing users use
role_delete_cascade()
-
f
user_has_password
...
- Returns True if the user has the password specified, False
otherwise. Passwords are case sensitive. Raises an exception if the
user doesn't exist.
-
f
user_has_group
...
- Returns True if the user has the group specified, False
otherwise. The value for group can be None to test that
the user doesn't belong to a group. Raises an exception if the
user doesn't exist.
-
f
role_create
...
- Add a new role to the system
-
m
postgresql_driver
...
-
C
UsersDriver
...
- Raw SQL Version
-
f
user_password
...
- Returns the password associated with the user or None if no
password exists. Raises an exception is the user doesn't exist.
-
f
user_group
...
- Returns the group associated with the user or None if no group is
associated. Raises an exception is the user doesn't exist.
-
f
user_add_role
...
- Sets the user's role to the lowercase of role. If the role doesn't
exist and add_if_necessary is True the role will also be
added. Otherwise an AuthKitNoSuchRoleError will be raised. Raises
an exception if the user doesn't exist.
-
f
create_tables
...
-
f
__init__
...
-
f
user_set_username
...
- Sets the user's username to the lowercase of new_username.
Raises an exception if the user doesn't exist or if there is already
a user with the username specified by new_username.
-
f
group_create
...
- Add a new group to the system
-
f
user_set_group
...
- Sets the user's group to the lowercase of group or None. If
the group doesn't exist and add_if_necessary is True the
group will also be added. Otherwise an AuthKitNoSuchGroupError
will be raised. Raises an exception if the user doesn't exist.
-
f
user_remove_role
...
- Removes the role from the user specified by username. Raises
an exception if the user doesn't exist.
-
f
user_remove_group
...
- Sets the group to None for the user specified by username.
Raises an exception if the user doesn't exist.
-
f
group_delete
...
- Remove the group specified. Rasies an exception if the group is still in use.
To delete the group and remove it from all existing users use group_delete_cascade()
-
f
list_roles
...
- Returns a lowercase list of all roll names ordered alphabetically
-
f
list_groups
...
- Returns a lowercase list of all groups ordered alphabetically
-
f
user
...
- Returns a dictionary in the following format:
-
f
user_exists
...
- Returns True if a user exists with the given username, False
otherwise. Usernames are case insensitive.
-
f
user_create
...
- Create a new user with the username, password and group name specified.
-
f
role_exists
...
- Returns True if the role exists, False otherwise. Roles are
case insensitive.
-
f
group_exists
...
- Returns True if the group exists, False otherwise. Groups
are case insensitive.
-
f
user_has_role
...
- Returns True if the user has the role specified, False
otherwise. Raises an exception if the user doesn't exist.
-
f
list_users
...
- Returns a lowecase list of all usernames ordered alphabetically
-
f
role_delete
...
- Remove the role specified. Rasies an exception if the role is still in use.
To delete the role and remove it from all existing users use
role_delete_cascade()
-
f
user_has_password
...
- Returns True if the user has the password specified, False
otherwise. Passwords are case sensitive. Raises an exception if the
user doesn't exist.
-
f
user_has_group
...
- Returns True if the user has the group specified, False
otherwise. The value for group can be None to test that
the user doesn't belong to a group. Raises an exception if the
user doesn't exist.
-
f
role_create
...
- Add a new role to the system
-
m
template
...
- Paster create template for creating your own authentication methods.
-
m
pylons_adaptors
...
- This module is deprecated. Please update your code to use
authkit.authorize.pylons_adaptors instead of this module.
-
m
permissions
...
- Permission objects
-
a
log
...
-
C
And
...
- Checks all the permission objects listed as keyword arguments in turn.
Permissions are checked from left to right. The error raised by the And
permission is the error raised by the first permission check to fail.
-
C
HasAuthKitRole
...
- Designed to work with the user management API described in the AuthKit manual.
-
f
check
...
- Should return True if the user has the role or
False if the user doesn't exist or doesn't have the role.
-
f
__init__
...
-
C
UserIn
...
- Checks the REMOTE_USER is one of the users specified.
-
C
Exists
...
- Checks the specified key is present in the environ.
-
C
Permission
...
- The base class for all permissions objects.
-
C
RemoteUser
...
- Checks someone is signed in by checking for the presence of the
REMOTE_USER.
-
C
RequestPermission
...
- The base class for all request-based permissions
-
C
FromIP
...
- Checks that the remote host specified in the environment key is one
of the hosts specified in hosts.
-
C
HasAuthKitGroup
...
- Designed to work with the user management API described in the AuthKit manual.
-
f
check
...
- Should return True if the user has the group or
False if the user doesn't exist or doesn't have the group.
-
f
__init__
...
-
C
BetweenTimes
...
- Only grants access if the request is made on or after start and
before end. Times should be specified as datetime.time objects.
-
C
AuthKitConfigError
...
- Raised when there is a problem with the
configuration options chosen for the authenticate middleware
-
C
ValidAuthKitUser
...
- Checks that the signed in user is one of the users specified when setting up
the user management API.