MCPcopy Index your code
hub / github.com/dataease/SQLBot / create_access_token

Function create_access_token

backend/common/core/security.py:15–21  ·  view source on GitHub ↗
(data: dict | Any, expires_delta: timedelta)

Source from the content-addressed store, hash-verified

13
14
15def create_access_token(data: dict | Any, expires_delta: timedelta) -> str:
16 to_encode = data.copy()
17 expire = datetime.now(timezone.utc) + expires_delta
18 to_encode.update({"exp": expire})
19 # to_encode = {"exp": expire, "account": str(subject)}
20 encoded_jwt = jwt.encode(to_encode, settings.SECRET_KEY, algorithm=ALGORITHM)
21 return encoded_jwt
22
23
24def verify_password(plain_password: str, hashed_password: str) -> bool:

Callers 3

mcp_startFunction · 0.90
validatorFunction · 0.90
local_loginFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected