Changeset 5907
- Timestamp:
- 31 Mar 2011, 23:00:28 (14 years ago)
- 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 37 37 from waeup.sirp.applicants.interfaces import ( 38 38 IApplicantPrincipalInfo, IApplicantPrincipal, IApplicantSessionCredentials, 39 IJAMBApplicantSessionCredentials)39 ) 40 40 from waeup.sirp.applicants import get_applicant_data 41 41 from waeup.sirp.interfaces import IAuthPluginUtility … … 135 135 return None 136 136 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_code144 145 137 class WAeUPApplicantCredentialsPlugin(grok.GlobalUtility, 146 138 SessionCredentialsPlugin): … … 189 181 # its structure. 190 182 return None 191 192 # Entered credentials are ordinary applicant credentials,193 # not JAMB-screened applicant credentials194 183 return {'accesscode': credentials.getAccessCode()} 195 184 -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
r5866 r5907 710 710 ) 711 711 712 class IJAMBApplicantsFormChallenger(IApplicantsFormChallenger):713 """A challenger that uses a browser form to collect applicant714 credentials for applicants in JAMB process.715 716 JAMB-screened applicants have to provide an extra registration717 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 for722 the JAMB registration number.''',723 default = u'jamb_reg_no',724 )725 712 726 713 class IApplicantSessionCredentials(Interface): … … 735 722 """Return the access code.""" 736 723 737 738 class IJAMBApplicantSessionCredentials(IApplicantSessionCredentials):739 """Interface for storing and accessing JAMB applicant credentials in a740 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."""748 724 749 725 class IApplicantsContainerProvider(Interface): -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/interfaces.py
r5774 r5907 24 24 from zope import schema 25 25 from waeup.sirp.interfaces import IWAeUPObject 26 from waeup.sirp.applicants.interfaces import IApplicantBaseData 26 from waeup.sirp.applicants.interfaces import ( 27 IApplicantBaseData, IApplicantsFormChallenger, 28 IApplicantSessionCredentials, 29 ) 27 30 28 31 … … 86 89 required = True, 87 90 ) 91 92 class 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 106 class 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.