MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / generate_jwt

Function generate_jwt

app/api/agentops/api/utils.py:16–24  ·  view source on GitHub ↗
(session_id, jwt_secret)

Source from the content-addressed store, hash-verified

14
15@deprecated("use agentops.api.auth.generate_jwt")
16def generate_jwt(session_id, jwt_secret):
17 payload = {
18 "session_id": session_id,
19 "exp": (
20 datetime.datetime.now() + datetime.timedelta(hours=24) # Token expires in 24 hour
21 ).timestamp(),
22 }
23 token = jwt.encode(payload, jwt_secret or JWT_SECRET_KEY, algorithm="HS256")
24 return token
25
26
27@deprecated("use agentops.api.auth.generate_jwt")

Callers 3

create_sessionFunction · 0.90
v2_reauthorize_jwtFunction · 0.90
v2_create_sessionFunction · 0.90

Calls 2

timestampMethod · 0.80
encodeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…