MCPcopy Index your code
hub / github.com/fastapi-users/fastapi-users / test_generate_decode_jwt

Function test_generate_decode_jwt

tests/test_jwt.py:7–15  ·  view source on GitHub ↗
(secret: SecretType)

Source from the content-addressed store, hash-verified

5
6@pytest.mark.jwt
7def test_generate_decode_jwt(secret: SecretType):
8 audience = "TEST_AUDIENCE"
9 data = {"foo": "bar", "aud": audience}
10
11 jwt = generate_jwt(data, secret, 3600)
12 decoded = decode_jwt(jwt, secret, [audience])
13
14 assert decoded["foo"] == "bar"
15 assert decoded["aud"] == audience

Callers

nothing calls this directly

Calls 2

generate_jwtFunction · 0.90
decode_jwtFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…