MCPcopy Index your code
hub / github.com/python/cpython / _auth_plain

Method _auth_plain

Lib/test/test_smtplib.py:889–900  ·  view source on GitHub ↗
(self, arg=None)

Source from the content-addressed store, hash-verified

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:

Callers

nothing calls this directly

Calls 5

_decode_base64Method · 0.95
_authenticatedMethod · 0.95
pushMethod · 0.45
splitMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected