(self, arg=None)
| 887 | return base64.decodebytes(string.encode('ascii')).decode('utf-8') |
| 888 | |
| 889 | def _auth_plain(self, arg=None): |
| 890 | if arg is None: |
| 891 | self.push('334 ') |
| 892 | else: |
| 893 | logpass = self._decode_base64(arg) |
| 894 | try: |
| 895 | *_, user, password = logpass.split('\0') |
| 896 | except ValueError as e: |
| 897 | self.push('535 Splitting response {!r} into user and password' |
| 898 | ' failed: {}'.format(logpass, e)) |
| 899 | return |
| 900 | self._authenticated(user, password == sim_auth[1]) |
| 901 | |
| 902 | def _auth_login(self, arg=None): |
| 903 | if arg is None: |
nothing calls this directly
no test coverage detected