applicants.authentication - Applicants Authentication Components

Authenticate applicants.

class waeup.kofa.applicants.authentication.ApplicantAccount(context)[source]

Bases: waeup.kofa.students.authentication.StudentAccount

An adapter to turn applicant objects into accounts on-the-fly.

__doc__ = 'An adapter to turn applicant objects into accounts on-the-fly.\n '
__implemented__ = <implementedBy waeup.kofa.applicants.authentication.ApplicantAccount>
__module__ = 'waeup.kofa.applicants.authentication'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
checkPassword(password)[source]

Check whether the given password matches the one stored by students. We additionally check if applicant account has been suspended or if the portal is blocked.

name
title
user_type
class waeup.kofa.applicants.authentication.ApplicantsAuthenticatorPlugin[source]

Bases: waeup.kofa.students.authentication.StudentsAuthenticatorPlugin

__doc__ = None
__implemented__ = <implementedBy waeup.kofa.applicants.authentication.ApplicantsAuthenticatorPlugin>
__module__ = 'waeup.kofa.applicants.authentication'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
getAccount(login)[source]

Look up a applicant identified by login. Returns an account.

First we split the login name into the container part and the application number part. Then we simply look up the key under which the applicant is stored in the respective applicants cointainer of the portal.

Returns not an applicant but an account object adapted from any applicant found.

If no such applicant exists, None is returned.

class waeup.kofa.applicants.authentication.ApplicantsAuthenticatorSetup[source]

Bases: grokcore.component.components.GlobalUtility

Register or unregister applicant authentication for a PAU.

This piece is called when a new site is created.

__doc__ = 'Register or unregister applicant authentication for a PAU.\n\n This piece is called when a new site is created.\n '
__implemented__ = <implementedBy waeup.kofa.applicants.authentication.ApplicantsAuthenticatorSetup>
__module__ = 'waeup.kofa.applicants.authentication'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
register(pau)[source]
unregister(pau)[source]