MCPcopy Index your code
hub / github.com/AgentOps-AI/agentops / verify_jwt

Function verify_jwt

app/api/agentops/api/auth.py:83–93  ·  view source on GitHub ↗

Verify a JWT token

(token: str)

Source from the content-addressed store, hash-verified

81
82
83def verify_jwt(token: str) -> JWTPayload:
84 """Verify a JWT token"""
85 _assert_jwt_secret()
86
87 payload_data = jwt.decode(
88 token,
89 JWT_SECRET_KEY,
90 algorithms=[JWT_ALGO],
91 audience="authenticated", # Verify audience claim
92 )
93 return JWTPayload(**payload_data)
94
95
96async def get_jwt_token(authorization: str = Header(None)) -> JWTPayload:

Callers 5

_get_auth_payloadMethod · 0.90
test_verify_jwt_validMethod · 0.90
get_jwt_tokenFunction · 0.70

Calls 3

_assert_jwt_secretFunction · 0.85
JWTPayloadClass · 0.85
decodeMethod · 0.80

Tested by 3

test_verify_jwt_validMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…