1.2.10.4 AuthManager Objects

The web.auth.manager() function has the following parameters and is used to create a AuthManager onject:

manager( driver )

driver
The Driver object.

The AuthManager object returned by the manager() function and has the following methods and attributes:

class AuthManager

Auth Manager for creating modifying and removing users and applications.

getUser( username)
Return a User object containing all there is to know about a user. User objects are described below.

applicationExists( app)
Return True if there is an application named app, False otherwise.

addApplication( app)
Adds an application named app.

removeApplication( app)
Removes the application named app.

apps( )
Return a list of application names.

userExists( username)
Return True if there is a user with the username username, False otherwise.

addUser( username, password[,firstname=''][,surname=''][email=''])
Adds a user with the username username and password password to the system. You can optionally also specify the firstname, surname and email address of the user.

removeUser( username)
Removes the user with the username username.

getFirstname( username)
Returns the firstname of the user username.

setFirstname( username, value)
Sets the firstname of the user username to value.

getSurname( username)
Returns the surname of the user username.

setSurname( username, value)
Sets the surname of the user username to value.

getPassword( username)
Returns the password of the user username.

setPassword( username, value)
Sets the password of the user username to value.

getEmail( username)
Returns the email address of the user username.

setEmail( username, value)
Sets the email address of the user username to value.

users( )
Return a list of usernames.

getAccessLevel( username, app)
Returns the access level of the user username for the application named app.

setAccessLevel( username, app, level)
Sets the access level of the user username for the application named app to level.

getAccessLevels( username)
Returns a dictionary of application name, access level pairs for the user with the username username.