shared_libraries.security#
Security functions shared between the microservices.
Attributes#
Functions#
|
Resolve the current user by validating the access token against user-login-manager. |
Compute a complex password hash with salt. |
Module Contents#
- shared_libraries.security.USERLOGIN_HOST = 'user-login-manager:8000'#
- shared_libraries.security.USERLOGIN_URI = '/api/v1/userlogin/getcurrentuser'#
- shared_libraries.security.oauth2_scheme#
- async shared_libraries.security.get_current_user(access_token: Annotated[str, Depends(oauth2_scheme)]) → scanhub_libraries.models.User#
Resolve the current user by validating the access token against user-login-manager.
- shared_libraries.security.compute_complex_password_hash(password: str, salt: str) → str#
Compute a complex password hash with salt.
It should take quite a bit of computation to guard against brute force attacks.