MCPcopy
hub / github.com/encode/starlette / has_required_scope

Function has_required_scope

starlette/authentication.py:18–22  ·  view source on GitHub ↗
(conn: HTTPConnection, scopes: Sequence[str])

Source from the content-addressed store, hash-verified

16
17
18def has_required_scope(conn: HTTPConnection, scopes: Sequence[str]) -> bool:
19 for scope in scopes:
20 if scope not in conn.auth.scopes:
21 return False
22 return True
23
24
25def requires(

Callers 3

websocket_wrapperFunction · 0.85
async_wrapperFunction · 0.85
sync_wrapperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected