Changeset 5907 for main/waeup.sirp/trunk


Ignore:
Timestamp:
31 Mar 2011, 23:00:28 (14 years ago)
Author:
uli
Message:

Move JAMB-related authentication pieces (including ifaces) to jambtables module.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/applicants
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/authentication.py

    r5904 r5907  
    3737from waeup.sirp.applicants.interfaces import (
    3838    IApplicantPrincipalInfo, IApplicantPrincipal, IApplicantSessionCredentials,
    39     IJAMBApplicantSessionCredentials)
     39    )
    4040from waeup.sirp.applicants import get_applicant_data
    4141from waeup.sirp.interfaces import IAuthPluginUtility
     
    135135        return None
    136136   
    137 class JAMBApplicantCredentials(ApplicantCredentials):
    138     """Credentials class for JAMB-screened applicants.
    139     """
    140     grok.implements(IJAMBApplicantSessionCredentials)
    141 
    142     def __init__(self, access_code):
    143         self.access_code = access_code
    144 
    145137class WAeUPApplicantCredentialsPlugin(grok.GlobalUtility,
    146138                                      SessionCredentialsPlugin):
     
    189181            # its structure.
    190182            return None
    191 
    192         # Entered credentials are ordinary applicant credentials,
    193         # not JAMB-screened applicant credentials
    194183        return {'accesscode': credentials.getAccessCode()}
    195184
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py

    r5866 r5907  
    710710        )
    711711
    712 class IJAMBApplicantsFormChallenger(IApplicantsFormChallenger):
    713     """A challenger that uses a browser form to collect applicant
    714        credentials for applicants in JAMB process.
    715 
    716        JAMB-screened applicants have to provide an extra registration
    717        no. provided by JAMB.
    718     """
    719     jamb_reg_no_field = schema.TextLine(
    720         title = u'JAMB registration no.',
    721         description = u'''Field of the login page which is looked up for
    722                           the JAMB registration number.''',
    723         default = u'jamb_reg_no',
    724         )
    725712
    726713class IApplicantSessionCredentials(Interface):
     
    735722        """Return the access code."""
    736723
    737 
    738 class IJAMBApplicantSessionCredentials(IApplicantSessionCredentials):
    739     """Interface for storing and accessing JAMB applicant credentials in a
    740        session.
    741     """
    742 
    743     def __init__(access_code, jamb_reg_no):
    744         """Create credentials for JAMB screened applicants."""
    745 
    746     def getJAMBRegNo():
    747         """Return the JAMB registration no."""
    748724
    749725class IApplicantsContainerProvider(Interface):
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/interfaces.py

    r5774 r5907  
    2424from zope import schema
    2525from waeup.sirp.interfaces import IWAeUPObject
    26 from waeup.sirp.applicants.interfaces import IApplicantBaseData
     26from waeup.sirp.applicants.interfaces import (
     27    IApplicantBaseData, IApplicantsFormChallenger,
     28    IApplicantSessionCredentials,
     29    )
    2730
    2831
     
    8689        required = True,
    8790        )
     91
     92class IJAMBApplicantsFormChallenger(IApplicantsFormChallenger):
     93    """A challenger that uses a browser form to collect applicant
     94       credentials for applicants in JAMB process.
     95
     96       JAMB-screened applicants have to provide an extra registration
     97       no. provided by JAMB.
     98    """
     99    jamb_reg_no_field = schema.TextLine(
     100        title = u'JAMB registration no.',
     101        description = u'''Field of the login page which is looked up for
     102                          the JAMB registration number.''',
     103        default = u'jamb_reg_no',
     104        )
     105
     106class IJAMBApplicantSessionCredentials(IApplicantSessionCredentials):
     107    """Interface for storing and accessing JAMB applicant credentials in a
     108       session.
     109    """
     110
     111    def __init__(access_code, jamb_reg_no):
     112        """Create credentials for JAMB screened applicants."""
     113
     114    def getJAMBRegNo():
     115        """Return the JAMB registration no."""
Note: See TracChangeset for help on using the changeset viewer.