MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / create_access_token

Function create_access_token

backend/src/auth/services.py:61–65  ·  view source on GitHub ↗
(subject: str | Any, expires_delta: timedelta)

Source from the content-addressed store, hash-verified

59
60
61def create_access_token(subject: str | Any, expires_delta: timedelta) -> str:
62 expire = datetime.now(timezone.utc) + expires_delta
63 to_encode = {"exp": expire, "sub": str(subject)}
64 encoded_jwt = jwt.encode(to_encode, settings.SECRET_KEY, algorithm=ALGORITHM)
65 return encoded_jwt
66
67
68def get_password_hash(password: str) -> str:

Callers 1

test_create_access_tokenFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_create_access_tokenFunction · 0.72