Skip to main content

Module test_utils

Module test_utils 

Source
Expand description

Utilities when testing, that allow doing insecure things to authentication

Statics§

SECRET 🔒
An empty secret, used for authentication

Functions§

auth_header_for_new_user
Get a header containing authentication for the user user_id
auth_token_for_new_user
Get an auth token for the user user_id, with the device id MYDEVICEID
auth_token_for_new_user_with_device
Get an auth token for the user user_id with a specific device id
generate_auth_token
Generates an auth token for a user and device
mock_oidc_keys
Mock an OIDC server returning a specific key set and make the server config point to it.
test_jwk
JWK of the in-memory secret used for test authentication