Changeset 10396 for main/waeup.cas/trunk/waeup/cas/authenticators.py
- Timestamp:
- 4 Jul 2013, 10:45:39 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.cas/trunk/waeup/cas/authenticators.py
r10394 r10396 97 97 98 98 def check_credentials(self, username='', password=''): 99 """If username is ``'bird'`` and password ``'bebop'`` return 100 ``True``, else ``False``. 99 """If username is ``'bird'`` and password ``'bebop'`` check 100 will succeed. 101 102 Returns a tuple ``(<STATUS>, <REASON>)`` with ``<STATUS>`` 103 being a boolean and ``<REASON>`` being a string giving the 104 reason why login failed (if so) or an empty string. 101 105 """ 102 return username == 'bird' and password == 'bebop' 106 reason = '' 107 result = username == 'bird' and password == 'bebop' 108 if not result: 109 reason = 'Invalid username or password.' 110 return result, reason
Note: See TracChangeset for help on using the changeset viewer.