MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / _get_jwt_secret

Function _get_jwt_secret

apps/admin/dependencies.py:15–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14
15def _get_jwt_secret() -> bytes:
16 secret = getattr(settings, "jwt_secret", "")
17 if not secret:
18 raise RuntimeError("JWT签名密钥未初始化")
19 return secret.encode()
20
21
22def create_token(data: dict, expires_in: int = 3600 * 24 * 30) -> str:

Callers 2

create_tokenFunction · 0.85
verify_tokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected