Index

A B C D E F I J K L M O P R S T U V 
All Classes and Interfaces|All Packages|Constant Field Values

A

ADMIN_PASSWORD - Static variable in class org.pac4j.testkit.TestConstants
 
ADMIN_USERNAME - Static variable in class org.pac4j.testkit.TestConstants
 
allRolesAuthorizerConfig() - Static method in class org.pac4j.testkit.TestConfigs
JWT config where /protected requires BOTH ROLE_USER and ROLE_ADMIN.
API_KEY - Static variable in class org.pac4j.testkit.TestConstants
 
ApiKeyScenarios - Class in org.pac4j.testkit
Pre-assembled HTTP test scenarios for API key (direct client) authentication.
AuthorizerScenarios - Class in org.pac4j.testkit
Pre-assembled HTTP test scenarios for authorization rules: RequireAllRoles authorizer, HTTP method matchers, and path matchers.

B

basicAuthConfig() - Static method in class org.pac4j.testkit.TestConfigs
HTTP Basic authentication.
BasicAuthScenarios - Class in org.pac4j.testkit
 

C

CALLBACK_PATH - Static variable in class org.pac4j.testkit.TestConstants
 
chainedConfig() - Static method in class org.pac4j.testkit.TestConfigs
JWT (Bearer token) AND API Key (X-Api-Key) chained on the same endpoint.
ClientChainingScenarios - Class in org.pac4j.testkit
Pre-assembled HTTP test scenarios for multiple authentication clients chained on the same protected endpoint.

D

directConfig() - Static method in class org.pac4j.testkit.TestConfigs
API key via X-Api-Key header.

E

expiredToken() - Static method in class org.pac4j.testkit.TestTokens
JWT that is structurally valid but already expired (exp = 1 hour ago).

F

formConfig() - Static method in class org.pac4j.testkit.TestConfigs
Form-based authentication with username/password POST.
FormScenarios - Class in org.pac4j.testkit
Pre-assembled HTTP test scenarios for form-based authentication.

I

invalidToken() - Static method in class org.pac4j.testkit.TestTokens
Garbage string that fails JWT parsing.

J

jwtConfig() - Static method in class org.pac4j.testkit.TestConfigs
JWT via Authorization: Bearer token header.
JwtScenarios - Class in org.pac4j.testkit
Pre-assembled HTTP test scenarios for JWT (Bearer token) authentication.

K

keyPair() - Static method in class org.pac4j.testkit.TestTokens
The RSA key pair used by both TestTokens and TestConfigs.jwtConfig().

L

LOGIN_PATH - Static variable in class org.pac4j.testkit.TestConstants
 
LOGOUT_CALLBACK_PATH - Static variable in class org.pac4j.testkit.TestConstants
 
LOGOUT_PATH - Static variable in class org.pac4j.testkit.TestConstants
 

M

methodMatcherConfig() - Static method in class org.pac4j.testkit.TestConfigs
JWT config where /protected allows GET but denies POST via HttpMethodMatcher.

O

oidcConfig(String) - Static method in class org.pac4j.testkit.TestConfigs
OAuth2/OIDC authorization code flow via mock-oauth2-server.
OidcScenarios - Class in org.pac4j.testkit
Pre-assembled HTTP test scenarios for OAuth2/OIDC authorization code flow.
org.pac4j.testkit - package org.pac4j.testkit
 

P

PASSWORD - Static variable in class org.pac4j.testkit.TestConstants
 
pathMatcherConfig() - Static method in class org.pac4j.testkit.TestConfigs
JWT config where /protected requires auth but /other is public via PathMatcher.
POST_LOGOUT_REDIRECT_PATH - Static variable in class org.pac4j.testkit.TestConstants
 
PROTECTED_ADMIN_PATH - Static variable in class org.pac4j.testkit.TestConstants
 
PROTECTED_PATH - Static variable in class org.pac4j.testkit.TestConstants
 

R

ROLE_ADMIN - Static variable in class org.pac4j.testkit.TestConstants
 
ROLE_USER - Static variable in class org.pac4j.testkit.TestConstants
 
runAdminAccess(String) - Static method in class org.pac4j.testkit.JwtScenarios
GET /protected/admin with admin JWT -> 200
runAdminDenied(String) - Static method in class org.pac4j.testkit.JwtScenarios
GET /protected/admin with user (non-admin) JWT -> 403
runApiKeySucceeds(String) - Static method in class org.pac4j.testkit.ClientChainingScenarios
GET /protected with valid API key (second in chain) -> 200
runAuthorizationCodeFlow(String, MockOAuth2Server) - Static method in class org.pac4j.testkit.OidcScenarios
Full authorization code flow: GET /protected -> redirect to IdP -> follow redirects through authorize -> callback -> /protected -> 200
runBadCredentials(String) - Static method in class org.pac4j.testkit.BasicAuthScenarios
 
runBadCredentials(String) - Static method in class org.pac4j.testkit.FormScenarios
POST /login with wrong password -> redirect to /login?error
runBadKey(String) - Static method in class org.pac4j.testkit.ApiKeyScenarios
 
runCallbackError(String) - Static method in class org.pac4j.testkit.OidcScenarios
Verify that OAuth callback errors are handled gracefully (not 200).
runExpiredToken(String) - Static method in class org.pac4j.testkit.JwtScenarios
GET /protected with expired JWT -> 401
runHappyPath(String) - Static method in class org.pac4j.testkit.ApiKeyScenarios
 
runHappyPath(String) - Static method in class org.pac4j.testkit.BasicAuthScenarios
 
runHappyPath(String) - Static method in class org.pac4j.testkit.FormScenarios
POST /login with valid credentials, follow redirect to /protected -> 200
runHappyPath(String) - Static method in class org.pac4j.testkit.JwtScenarios
GET /protected with valid JWT -> 200
runInvalidToken(String) - Static method in class org.pac4j.testkit.JwtScenarios
GET /protected with garbage token -> 401
runJwtExpiredApiKeyValid(String) - Static method in class org.pac4j.testkit.ClientChainingScenarios
Expired JWT + valid API key -> 200 (first client fails, second succeeds)
runJwtPriorityOverApiKey(String) - Static method in class org.pac4j.testkit.ClientChainingScenarios
Both valid JWT and API key -> 200 (JWT has priority)
runJwtSucceeds(String) - Static method in class org.pac4j.testkit.ClientChainingScenarios
GET /protected with valid JWT (first in chain) -> 200
runJwtValidApiKeyInvalid(String) - Static method in class org.pac4j.testkit.ClientChainingScenarios
Valid JWT + invalid API key -> 200 (first client matches, second ignored)
runLogout(String) - Static method in class org.pac4j.testkit.FormScenarios
POST /logout invalidates session -> /protected redirects to /login
runLogout(String, MockOAuth2Server) - Static method in class org.pac4j.testkit.OidcScenarios
RP-initiated logout: 1.
runLogoutWithCustomRedirect(String) - Static method in class org.pac4j.testkit.FormScenarios
POST /logout -> redirects to configured post-logout URL.
runMethodMatcherGetAllowed(String) - Static method in class org.pac4j.testkit.AuthorizerScenarios
GET /protected with valid JWT -> 200 (GET allowed)
runMethodMatcherPostDenied(String) - Static method in class org.pac4j.testkit.AuthorizerScenarios
POST /protected with valid JWT -> 403 (POST denied by matcher)
runMissingAuth(String) - Static method in class org.pac4j.testkit.BasicAuthScenarios
 
runMissingKey(String) - Static method in class org.pac4j.testkit.ApiKeyScenarios
 
runMissingToken(String) - Static method in class org.pac4j.testkit.JwtScenarios
GET /protected with no token -> 401
runNeitherFails(String) - Static method in class org.pac4j.testkit.ClientChainingScenarios
GET /protected with no auth headers -> 401
runPathMatcherOtherPublic(String) - Static method in class org.pac4j.testkit.AuthorizerScenarios
GET /other with no auth -> 200 (path excluded from security)
runPathMatcherProtected(String) - Static method in class org.pac4j.testkit.AuthorizerScenarios
GET /protected with valid JWT -> 200 (path requires auth)
runRedirectAfterLoginToRequestedUrl(String) - Static method in class org.pac4j.testkit.FormScenarios
GET /protected/admin without session -> redirect to /login.
runRedirectWhenUnauthenticated(String) - Static method in class org.pac4j.testkit.FormScenarios
GET /protected with no session -> redirect to /login
runRequireAllRolesAccessDenied(String) - Static method in class org.pac4j.testkit.AuthorizerScenarios
GET /protected with JWT containing only ROLE_USER -> 403
runRequireAllRolesAccessGranted(String) - Static method in class org.pac4j.testkit.AuthorizerScenarios
GET /protected with JWT containing both ROLE_USER and ROLE_ADMIN -> 200
runSessionInvalidation(String) - Static method in class org.pac4j.testkit.SessionScenarios
Login, access protected resource, logout, verify protected resource is no longer accessible.
runSessionIsolation(String) - Static method in class org.pac4j.testkit.SessionScenarios
Two separate users with separate sessions.
runUnauthenticatedRedirect(String, String) - Static method in class org.pac4j.testkit.OidcScenarios
Verify unauthenticated access redirects to the IdP's authorize endpoint.

S

SessionScenarios - Class in org.pac4j.testkit
Pre-assembled HTTP test scenarios for session management.

T

TestConfigs - Class in org.pac4j.testkit
Provides standard pac4j Config objects for each authentication mechanism.
TestConstants - Class in org.pac4j.testkit
Mandated paths, test credentials, and role constants shared by all scenarios and configs.
TestTokens - Class in org.pac4j.testkit
Creates valid, expired, and invalid JWT tokens using a hardcoded RSA key pair.

U

UNPROTECTED_PATH - Static variable in class org.pac4j.testkit.TestConstants
 
USERNAME - Static variable in class org.pac4j.testkit.TestConstants
 

V

validAdminToken() - Static method in class org.pac4j.testkit.TestTokens
JWT for user "admin" with ROLE_ADMIN, valid for 1 hour.
validDualRoleToken() - Static method in class org.pac4j.testkit.TestTokens
JWT for user "dualuser" with both ROLE_USER and ROLE_ADMIN, valid for 1 hour.
validUserToken() - Static method in class org.pac4j.testkit.TestTokens
JWT for user "testuser" with ROLE_USER, valid for 1 hour.
A B C D E F I J K L M O P R S T U V 
All Classes and Interfaces|All Packages|Constant Field Values