| Age | Commit message (Collapse) | Author |
|
Test that POST /auth/user/masquerade/ enforces the
system:user:masquerade privilege. Both admin and basic users can
obtain a token with masquerade scope (the test client supports it),
but gn-auth's can_masquerade decorator checks the user's roles:
- Basic user → ForbiddenAccess → 403
- Admin user → can masquerade as basic user → 200
Adds three session-scoped fixtures to the test module: admin_masquerade_token,
basic_masquerade_token, and basic_user_id.
|
|
Test that GET /auth/user/ returns 200 with user fields when a valid
Bearer token is present, and 401 when no token or a garbage token is
supplied.
|
|
Test that POST /auth/token returns 401 when given a wrong password or
an unknown email address.
|
|
Test that POST /auth/token with valid admin credentials returns 200,
includes an access_token, sets token_type to bearer, and grants at
least the requested scopes.
|