MCPcopy
hub / github.com/fastapi/fastapi / fake_decode_token

Function fake_decode_token

docs_src/security/tutorial003_an_py310.py:51–55  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

49
50
51def fake_decode_token(token):
52 # This doesn't provide any security at all
53 # Check the next version
54 user = get_user(fake_users_db, token)
55 return user
56
57
58async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]):

Callers 1

get_current_userFunction · 0.70

Calls 1

get_userFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…