Aller directement au contenu principal

openhands.server.auth.auth

get_sid_from_token

def get_sid_from_token(token: str, jwt_secret: str) -> str

Retrieves the session id from a JWT token.

Arguments:

  • token str - The JWT token from which the session id is to be extracted.

Returns:

  • str - The session id if found and valid, otherwise an empty string.

sign_token

def sign_token(payload: dict[str, object], jwt_secret: str) -> str

Signs a JWT token.