Package org.pac4j.dropwizard
Class Pac4jBundle<T extends io.dropwizard.core.Configuration>
java.lang.Object
org.pac4j.dropwizard.Pac4jBundle<T>
- All Implemented Interfaces:
io.dropwizard.core.ConfiguredBundle<T>
,Pac4jConfiguration<T>
public abstract class Pac4jBundle<T extends io.dropwizard.core.Configuration>
extends Object
implements io.dropwizard.core.ConfiguredBundle<T>, Pac4jConfiguration<T>
A
ConfiguredBundle
which sets up Pac4JSecurityFeature
,
Pac4JValueFactoryProvider
as well as installs SecurityFilter
s
into a Dropwizard application's Jersey filter chain.- Since:
- 1.0.0
- Author:
- Evan Meagher, Victor Noel - Linagora
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.pac4j.core.config.Config
To be used only after this bundle has been run (i.e., in theApplication.run(Configuration, Environment)
method.final void
initialize
(io.dropwizard.core.setup.Bootstrap<?> bootstrap) final void
protected void
setupJettySession
(io.dropwizard.core.setup.Environment environment) Override if needed, but prefer to exploitPac4jFactory.setSessionEnabled(boolean)
first.protected Collection<Pac4jFeatureSupport>
In case of override, do not forget to callsuper.supportedFeatures()
to get the default features, or to redefine them instead!Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.pac4j.dropwizard.Pac4jConfiguration
getPac4jFactory
-
Constructor Details
-
Pac4jBundle
public Pac4jBundle()
-
-
Method Details
-
initialize
public final void initialize(io.dropwizard.core.setup.Bootstrap<?> bootstrap) - Specified by:
initialize
in interfaceio.dropwizard.core.ConfiguredBundle<T extends io.dropwizard.core.Configuration>
-
supportedFeatures
In case of override, do not forget to callsuper.supportedFeatures()
to get the default features, or to redefine them instead!- Returns:
- the features to support for configuration parsing
- See Also:
-
run
-
setupJettySession
protected void setupJettySession(io.dropwizard.core.setup.Environment environment) Override if needed, but prefer to exploitPac4jFactory.setSessionEnabled(boolean)
first.- Parameters:
environment
- the dropwizardEnvironment
- Since:
- 1.1.0
-
getConfig
public org.pac4j.core.config.Config getConfig()To be used only after this bundle has been run (i.e., in theApplication.run(Configuration, Environment)
method.- Returns:
- the
Config
built duringrun(Configuration, Environment)
execution.
-