florist.api.routes.client.auth module

FastAPI client routes for authentication.

async check_default_user_token(token)[source]

Validate the default user against the token.

Parameters:

token (str) – (str) The token to validate the current user.

Return type:

AuthUser

Returns:

(AuthUser) The current authenticated user.

Raise:

(HTTPException) If the token is invalid.

async login_for_access_token(form_data)[source]

Make a login request to get an access token.

Parameters:

form_data (OAuth2PasswordRequestForm) – (OAuth2PasswordRequestForm) The form data from the login request.

Return type:

Token

Returns:

(Token) The access token.

Raise:

(HTTPException) If the user does not exist or the password is incorrect.