deseasion.backend.services.auth_service module

deseasion.backend.services.auth_service.basic_authenticated(fn)

Authenticate user with basic authentication.

Also add user to list of keyargs.

Parameters:

fn

Returns:

deseasion.backend.services.auth_service.check_basic_authentication(request_data)

Return the user corresponding to the Basic credentials, or None

deseasion.backend.services.auth_service.check_credentials(username, password)

Returns the user with the given credentials, or None

deseasion.backend.services.auth_service.check_jwt_authentication(request_data)

Return the user corresponding to the JWT, or None

deseasion.backend.services.auth_service.check_refresh_token(request_data)

Return the user if the refresh token is valid.

deseasion.backend.services.auth_service.is_jwt_valid(request_data)

Return True if the JWT token is valid, False otherwise

deseasion.backend.services.auth_service.refresh_token_required(fn)

Authenticate user with refresh token.

Also add user to list of keyargs.

Parameters:

fn

Returns:

deseasion.backend.services.auth_service.token_required(fn)

wrapper to verify that the request contains a jwt token

sends a 401 error if the token is missing or incorrect