Back to index

plone3  3.1.7
Public Member Functions
PluggableAuthService.interfaces.authservice.IPluggableAuthService Class Reference
Inheritance diagram for PluggableAuthService.interfaces.authservice.IPluggableAuthService:
Inheritance graph
[legend]
Collaboration diagram for PluggableAuthService.interfaces.authservice.IPluggableAuthService:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def searchUsers
def searchGroups
def searchPrincipals
def updateCredentials
def logout
def resetCredentials
def getUser
def getUserById
def validate

Detailed Description

The full, default contract for the pluggable authentication service.

Definition at line 144 of file authservice.py.


Member Function Documentation

Specify the interface called out in AccessControl.User.BasicUserFolder
as the "Public UserFolder object interface":

o N.B: "enumeration" methods ('getUserNames', 'getUsers') are *not*
   part of the contract!  See IEnumerableUserFolder.
Return the named user object or None.

Definition at line 117 of file authservice.py.

00117 
00118     def getUser( name ):
00119 
00120         """ Return the named user object or None.
00121         """

Here is the caller graph for this function:

def PluggableAuthService.interfaces.authservice.IUserFolder.getUserById (   id,
  default = None 
) [inherited]
Return the user corresponding to the given id.

o If no such user can be found, return 'default'.

Definition at line 122 of file authservice.py.

00122 
00123     def getUserById( id, default=None ):
00124 
00125         """ Return the user corresponding to the given id.
00126 
00127         o If no such user can be found, return 'default'.
00128         """

Publicly accessible method to log out a user. A wrapper
around resetCredentials that may implement some policy (the
default implementation redirects to HTTP_REFERER).

Definition at line 211 of file authservice.py.

00211 
00212     def logout(REQUEST):
00213         """Publicly accessible method to log out a user. A wrapper
00214         around resetCredentials that may implement some policy (the
00215         default implementation redirects to HTTP_REFERER).
00216         """

Reset credentials by informing all active resetCredentials
plugins

Definition at line 217 of file authservice.py.

00217 
00218     def resetCredentials(self, request, response):
00219         """Reset credentials by informing all active resetCredentials
00220         plugins
00221         """
00222 
00223 # The IMutableUserFolder and IEnumerableFolder are not supported
00224 # out-of-the-box by the pluggable authentication service.  These
00225 # interfaces describe contracts that other standard Zope user folders
00226 # implement.

Here is the caller graph for this function:

Search for groups.  Returns a sequence of dicts, each dict
representing a group matching the query, with the keys
'groupid','id', 'title', and 'principal_type', possibly among
others.  'principal_type' is always 'group'.

Possible keywords include the following:

o id: user id

o name: user name

o max_results: an int (or value castable to int) indicating
  the maximum number of results the method should return

o sort_by: the key in the user dictionary that should be used
  to sort the results

Definition at line 171 of file authservice.py.

00171 
00172     def searchGroups(**kw):
00173         """ Search for groups.  Returns a sequence of dicts, each dict
00174         representing a group matching the query, with the keys
00175         'groupid','id', 'title', and 'principal_type', possibly among
00176         others.  'principal_type' is always 'group'.
00177 
00178         Possible keywords include the following:
00179 
00180         o id: user id
00181 
00182         o name: user name
00183 
00184         o max_results: an int (or value castable to int) indicating
00185           the maximum number of results the method should return
00186 
00187         o sort_by: the key in the user dictionary that should be used
00188           to sort the results
00189         """

Here is the caller graph for this function:

Search for principals (users, groups, or both).  Returns a
sequence of dicts, each dict representing a principal (group
or user) matching the query.  groups will be represented with
dictionaries as described in searchGroups, and users as
described in searchUsers.  Possible keywords include id, name,
max_results, sort_by, and login.

Definition at line 190 of file authservice.py.

00190 
00191     def searchPrincipals(groups_first=False, **kw):
00192         """ Search for principals (users, groups, or both).  Returns a
00193         sequence of dicts, each dict representing a principal (group
00194         or user) matching the query.  groups will be represented with
00195         dictionaries as described in searchGroups, and users as
00196         described in searchUsers.  Possible keywords include id, name,
00197         max_results, sort_by, and login.
00198         """

The full, default contract for the pluggable authentication service.
Search for users.  Returns a sequence of dicts, each dict
representing a user matching the query, with the keys
'userid','id', 'login', 'title', and 'principal_type',
possibly among others.  'principal_type' is always 'user'.

Possible keywords include the following:

o id: user id

o name: user name

o max_results: an int (or value castable to int) indicating
  the maximum number of results the method should return

o sort_by: the key in the user dictionary that should be used
  to sort the results

o login: user login

Definition at line 149 of file authservice.py.

00149 
00150     def searchUsers(**kw):
00151 
00152         """ Search for users.  Returns a sequence of dicts, each dict
00153         representing a user matching the query, with the keys
00154         'userid','id', 'login', 'title', and 'principal_type',
00155         possibly among others.  'principal_type' is always 'user'.
00156 
00157         Possible keywords include the following:
00158 
00159         o id: user id
00160 
00161         o name: user name
00162 
00163         o max_results: an int (or value castable to int) indicating
00164           the maximum number of results the method should return
00165 
00166         o sort_by: the key in the user dictionary that should be used
00167           to sort the results
00168 
00169         o login: user login
00170         """

Here is the caller graph for this function:

def PluggableAuthService.interfaces.authservice.IPluggableAuthService.updateCredentials (   request,
  response,
  login,
  new_password 
)
Central updateCredentials method

This method is needed for cases where the credentials storage
and the credentials extraction is handled by different
plugins. Example case would be if the CookieAuthHelper is used
as a Challenge and Extraction plugin only to take advantage of
the login page feature but the credentials are not stored in
the CookieAuthHelper cookie but somewhere else, like in a
Session.

Definition at line 199 of file authservice.py.

00199 
00200     def updateCredentials(request, response, login, new_password):
00201         """Central updateCredentials method
00202 
00203         This method is needed for cases where the credentials storage
00204         and the credentials extraction is handled by different
00205         plugins. Example case would be if the CookieAuthHelper is used
00206         as a Challenge and Extraction plugin only to take advantage of
00207         the login page feature but the credentials are not stored in
00208         the CookieAuthHelper cookie but somewhere else, like in a
00209         Session.
00210         """

def PluggableAuthService.interfaces.authservice.IUserFolder.validate (   request,
  auth = '',
  roles = _noroles 
) [inherited]
Perform identification, authentication, and authorization.

o Return an IUser-conformant user object, or None if we can't
  identify / authorize the user.

o 'request' is the request object

o 'auth' is any credential information already extracted by
  the caller

o roles is the list of roles the caller

Definition at line 129 of file authservice.py.

00129 
00130     def validate( request, auth='', roles=_noroles ):
00131 
00132         """ Perform identification, authentication, and authorization.
00133 
00134         o Return an IUser-conformant user object, or None if we can't
00135           identify / authorize the user.
00136 
00137         o 'request' is the request object
00138 
00139         o 'auth' is any credential information already extracted by
00140           the caller
00141 
00142         o roles is the list of roles the caller
00143         """

Here is the caller graph for this function:


The documentation for this class was generated from the following file: