Package org.apache.juneau.petstore.jetty
Class App.AppConfig
java.lang.Object
org.apache.juneau.petstore.jetty.App.AppConfig
- Enclosing class:
- App
Application-specific configuration class contributing the top-level REST servlet and the console, API and admin
boundary filters.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of the deployment's configuration file, read from the working directory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionProvides the API's CSRF boundary, covering/petstore/*.config()Provides the deployment's configuration, named explicitly because the working directory is no longer scanned for*.cfg files.Provides the console's CSRF boundary, covering/consoleonly.jakarta.servlet.ServletProvides the top-level REST servlet, auto-mounted byJettyServerComponentatRest.path().
-
Field Details
-
CONFIG_NAME
Name of the deployment's configuration file, read from the working directory.- See Also:
-
-
Constructor Details
-
AppConfig
public AppConfig()
-
-
Method Details
-
config
Provides the deployment's configuration, named explicitly because the working directory is no longer scanned for*.cfg files.- Returns:
- The configuration.
-
rootResources
Provides the top-level REST servlet, auto-mounted byJettyServerComponentatRest.path().- Returns:
- The root servlet.
-
consoleBoundary
Provides the console's CSRF boundary, covering/consoleonly.The
/petstoreAPI is covered byapiBoundary();/petstore-uiis outside both: seePetstoreConsoleBoundary. It runs ahead of routing and ahead of authentication, for the request, forward, async and error dispatches; the include dispatch is deliberately not mapped. It is built over the samePetstoreApiBoundarythatapiBoundary()mounts, so the API token its pages carry is one the API filter accepts.- Returns:
- The filter registration.
-
apiBoundary
Provides the API's CSRF boundary, covering/petstore/*.It runs only on the original request: an internal forward or error dispatch to the API is not a new attacker-controlled request. The order keeps it just behind
consoleBoundary(); the two patterns never overlap.- Returns:
- The filter registration.
-