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

Function verify_jwt

app/api/agentops/api/utils.py:28–35  ·  view source on GitHub ↗
(token, secret_key)

Source from the content-addressed store, hash-verified

26
27@deprecated("use agentops.api.auth.generate_jwt")
28def verify_jwt(token, secret_key):
29 try:
30 payload = jwt.decode(token, secret_key, algorithms=["HS256"])
31 return payload["session_id"]
32 except jwt.ExpiredSignatureError:
33 raise ExpiredJWTError(401, "Expired Token")
34 except jwt.DecodeError:
35 RuntimeError("Invalid token")
36
37
38def validate_uuid(uuid_string) -> uuid.UUID:

Callers 6

v2_update_sessionFunction · 0.90
v2_create_agentFunction · 0.90
v2_create_threadFunction · 0.90
v2_create_eventsFunction · 0.90
v2_update_eventsFunction · 0.90
v2_update_logsFunction · 0.90

Calls 2

ExpiredJWTErrorClass · 0.90
decodeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…