Package org.pac4j.testkit
Class TestConfigs
java.lang.Object
org.pac4j.testkit.TestConfigs
Provides standard pac4j Config objects for each authentication mechanism.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.pac4j.core.config.ConfigHTTP Basic authentication.static org.pac4j.core.config.ConfigCookie-based session backed by JWT.static org.pac4j.core.config.ConfigAPI key via X-Api-Key header.static org.pac4j.core.config.ConfigForm-based authentication with username/password POST.static org.pac4j.core.config.ConfigJWT via Authorization: Bearer token header.static org.pac4j.core.config.ConfigoauthConfig(String mockOAuthServerUrl) OAuth2/OIDC authorization code flow via mock-oauth2-server.
-
Method Details
-
jwtConfig
public static org.pac4j.core.config.Config jwtConfig()JWT via Authorization: Bearer token header. -
formConfig
public static org.pac4j.core.config.Config formConfig()Form-based authentication with username/password POST. -
basicConfig
public static org.pac4j.core.config.Config basicConfig()HTTP Basic authentication. -
directConfig
public static org.pac4j.core.config.Config directConfig()API key via X-Api-Key header. -
cookieConfig
public static org.pac4j.core.config.Config cookieConfig()Cookie-based session backed by JWT. Uses the same RSA key as jwtConfig(). -
oauthConfig
OAuth2/OIDC authorization code flow via mock-oauth2-server.- Parameters:
mockOAuthServerUrl- base URL of the running mock-oauth2-server (e.g. http://localhost:12345)
-