Package org.pac4j.testkit
Class JwtScenarios
java.lang.Object
org.pac4j.testkit.JwtScenarios
Pre-assembled HTTP test scenarios for JWT (Bearer token) authentication.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidrunAdminAccess(String serverUrl) GET /protected/admin with admin JWT -> 200static voidrunAdminDenied(String serverUrl) GET /protected/admin with user (non-admin) JWT -> 403static voidrunExpiredToken(String serverUrl) GET /protected with expired JWT -> 401static voidrunHappyPath(String serverUrl) GET /protected with valid JWT -> 200static voidrunInvalidToken(String serverUrl) GET /protected with garbage token -> 401static voidrunMissingToken(String serverUrl) GET /protected with no token -> 401
-
Method Details
-
runHappyPath
GET /protected with valid JWT -> 200- Throws:
IOException
-
runMissingToken
GET /protected with no token -> 401- Throws:
IOException
-
runInvalidToken
GET /protected with garbage token -> 401- Throws:
IOException
-
runExpiredToken
GET /protected with expired JWT -> 401- Throws:
IOException
-
runAdminAccess
GET /protected/admin with admin JWT -> 200- Throws:
IOException
-
runAdminDenied
GET /protected/admin with user (non-admin) JWT -> 403- Throws:
IOException
-