tests.test_auth
Test the supported authentication methods
Module Contents
Functions
|
First one is normal, second is admin |
|
Check the response |
|
Test JWT-check endpoint with JWT authenticated client |
|
Test JWT-check endpoint with mTLS authenticated client |
|
Test mTLS-check endpoint with mTLS authenticated client |
|
Test mTLS-check endpoint with JWT authenticated client |
|
Test JWT-or-mTLS -check endpoint with JWT authenticated client |
|
Test JWT-or-mTLS -check endpoint with JWT authenticated client |
|
Test JWT-or-mTLS -check endpoint with mTLS authenticated client |
|
Test the valid user endpoint with valid and invalid CNs |
|
Test the valid user endpoint with valid and invalid subs |
|
Test the valid user endpoint with admin and non-admin CNs |
|
Test the valid user endpoint with admin and non-admin subs |
Attributes
- async two_users(ginosession)[source]
First one is normal, second is admin
- Parameters:
ginosession (None)
- Return type:
- async test_jwt_jwt(tilauspalvelu_jwt_client)[source]
Test JWT-check endpoint with JWT authenticated client
- Parameters:
tilauspalvelu_jwt_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_mtls_jwt(mtls_client)[source]
Test JWT-check endpoint with mTLS authenticated client
- Parameters:
mtls_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_mtls_mtls(mtls_client)[source]
Test mTLS-check endpoint with mTLS authenticated client
- Parameters:
mtls_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_jwt_mtls(tilauspalvelu_jwt_client)[source]
Test mTLS-check endpoint with JWT authenticated client
- Parameters:
tilauspalvelu_jwt_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_jwt_both_permissive(tilauspalvelu_jwt_client)[source]
Test JWT-or-mTLS -check endpoint with JWT authenticated client
- Parameters:
tilauspalvelu_jwt_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_jwt_both_notp(tilauspalvelu_jwt_client)[source]
Test JWT-or-mTLS -check endpoint with JWT authenticated client
- Parameters:
tilauspalvelu_jwt_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_mtls_both(mtls_client)[source]
Test JWT-or-mTLS -check endpoint with mTLS authenticated client
- Parameters:
mtls_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_valid_user_mtls(unauth_client, two_users)[source]
Test the valid user endpoint with valid and invalid CNs
- Parameters:
unauth_client (async_asgi_testclient.TestClient)
two_users (Tuple[rasenmaeher_api.db.Person, rasenmaeher_api.db.Person])
- Return type:
None
- async test_valid_user_jwt(unauth_client, two_users)[source]
Test the valid user endpoint with valid and invalid subs
- Parameters:
unauth_client (async_asgi_testclient.TestClient)
two_users (Tuple[rasenmaeher_api.db.Person, rasenmaeher_api.db.Person])
- Return type:
None
- async test_valid_admin_mtls(unauth_client, two_users)[source]
Test the valid user endpoint with admin and non-admin CNs
- Parameters:
unauth_client (async_asgi_testclient.TestClient)
two_users (Tuple[rasenmaeher_api.db.Person, rasenmaeher_api.db.Person])
- Return type:
None
- async test_valid_admin_jwt(unauth_client, two_users)[source]
Test the valid user endpoint with admin and non-admin subs
- Parameters:
unauth_client (async_asgi_testclient.TestClient)
two_users (Tuple[rasenmaeher_api.db.Person, rasenmaeher_api.db.Person])
- Return type:
None