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

Method _auth_login

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

Source from the content-addressed store, hash-verified

900 self._authenticated(user, password == sim_auth[1])
901
902 def _auth_login(self, arg=None):
903 if arg is None:
904 # base64 encoded 'Username:'
905 self.push('334 VXNlcm5hbWU6')
906 elif not hasattr(self, '_auth_login_user'):
907 self._auth_login_user = self._decode_base64(arg)
908 # base64 encoded 'Password:'
909 self.push('334 UGFzc3dvcmQ6')
910 else:
911 password = self._decode_base64(arg)
912 self._authenticated(self._auth_login_user, password == sim_auth[1])
913 del self._auth_login_user
914
915 def _auth_buggy(self, arg=None):
916 # This AUTH mechanism will 'trap' client in a neverending 334

Callers

nothing calls this directly

Calls 3

_decode_base64Method · 0.95
_authenticatedMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected