Package org.pac4j.testkit
Class FormScenarios
java.lang.Object
org.pac4j.testkit.FormScenarios
Pre-assembled HTTP test scenarios for form-based authentication.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidrunBadCredentials(String serverUrl) POST /login with wrong password -> redirect to /login?errorstatic voidrunHappyPath(String serverUrl) POST /login with valid credentials, follow redirect to /protected -> 200static voidrunRedirectWhenUnauthenticated(String serverUrl) GET /protected with no session -> redirect to /login
-
Method Details
-
runHappyPath
POST /login with valid credentials, follow redirect to /protected -> 200- Throws:
IOException
-
runBadCredentials
POST /login with wrong password -> redirect to /login?error- Throws:
IOException
-
runRedirectWhenUnauthenticated
GET /protected with no session -> redirect to /login- Throws:
IOException
-