MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / auth

Method auth

21-async/mojifinder/bottle.py:1331–1342  ·  view source on GitHub ↗

HTTP authentication data as a (user, password) tuple. This implementation currently supports basic (not digest) authentication only. If the authentication happened at a higher level (e.g. in the front web-server or a middleware), the password field is None, but

(self)

Source from the content-addressed store, hash-verified

1329
1330 @property
1331 def auth(self):
1332 """ HTTP authentication data as a (user, password) tuple. This
1333 implementation currently supports basic (not digest) authentication
1334 only. If the authentication happened at a higher level (e.g. in the
1335 front web-server or a middleware), the password field is None, but
1336 the user field is looked up from the ``REMOTE_USER`` environ
1337 variable. On any errors, None is returned. """
1338 basic = parse_auth(self.environ.get('HTTP_AUTHORIZATION',''))
1339 if basic: return basic
1340 ruser = self.environ.get('REMOTE_USER')
1341 if ruser: return (ruser, None)
1342 return None
1343
1344 @property
1345 def remote_route(self):

Callers

nothing calls this directly

Calls 2

parse_authFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected