Package repoze :: Package who :: Module interfaces :: Class IAuthenticator
[hide private]

Class IAuthenticator

source code


On ingress: validate the identity and return a user id or None.

Instance Methods [hide private]
 
authenticate(environ, identity)
identity -> 'userid' | None
source code
Class Variables [hide private]
  _InterfaceClass__attrs = {'authenticate': <zope.interface.inte...
  __bases__ = (<InterfaceClass repoze.who.interfaces.IPlugin>)
  __identifier__ = 'repoze.who.interfaces.IAuthenticator'
  __iro__ = (<InterfaceClass repoze.who.interfaces.IAuthenticato...
  __name__ = 'IAuthenticator'
  __sro__ = (<InterfaceClass repoze.who.interfaces.IAuthenticato...
  _implied = {<InterfaceClass repoze.who.interfaces.IAuthenticat...
  dependents = <WeakKeyDictionary at 27503792>

Inherited from zope.interface.Interface (private): _Element__tagged_values

Method Details [hide private]

authenticate(environ, identity)

source code 
identity -> 'userid' | None

o 'environ' is the WSGI environment.

o 'identity' will be a dictionary (with arbitrary keys and
  values).

o The IAuthenticator should return a single user id (optimally
  a string) if the identity can be authenticated.  If the
  identify cannot be authenticated, the IAuthenticator should
  return None.

Each instance of a registered IAuthenticator plugin that
matches the request classifier will be called N times during a
single request, where N is the number of identities found by
any IIdentifierPlugin instances.

An authenticator must not raise an exception if it is provided
an identity dictionary that it does not understand (e.g. if it
presumes that 'login' and 'password' are keys in the
dictionary, it should check for the existence of these keys
before attempting to do anything; if they don't exist, it
should return None).

An authenticator is permitted to add extra keys to the 'identity'
dictionary (e.g., to save metadata from a database query, rather
than requiring a separate query from an IMetadataProvider plugin).


Class Variable Details [hide private]

_InterfaceClass__attrs

Value:
{'authenticate': <zope.interface.interface.Method object at 0x1a3ce90>\
}

__iro__

Value:
(<InterfaceClass repoze.who.interfaces.IAuthenticator>,
 <InterfaceClass repoze.who.interfaces.IPlugin>,
 <InterfaceClass zope.interface.Interface>)

__sro__

Value:
(<InterfaceClass repoze.who.interfaces.IAuthenticator>,
 <InterfaceClass repoze.who.interfaces.IPlugin>,
 <InterfaceClass zope.interface.Interface>)

_implied

Value:
{<InterfaceClass repoze.who.interfaces.IAuthenticator>: (),
 <InterfaceClass repoze.who.interfaces.IPlugin>: (),
 <InterfaceClass zope.interface.Interface>: ()}