Package io.javalin.community.ssl
Class SSLPlugin
java.lang.Object
io.javalin.community.ssl.SSLPlugin
- All Implemented Interfaces:
io.javalin.plugin.Plugin
A plugin to easily enable SSL on a Javalin server.
The intended configuration pattern is to use the SSLPlugin(Consumer) constructor to configure the
plugin, either though a lambda or a Consumer. This allows for a more fluent configuration pattern.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SSLPlugin
public SSLPlugin()Creates a new SSLPlugin with the default configuration. -
SSLPlugin
Creates a new SSLPlugin with the given configuration.- Parameters:
config- The configuration to use.
-
SSLPlugin
Creates a new SSLPlugin with the given configuration lambda/supplier. This is useful if you want to use the default configuration and only change a few values. Recommended way to create a new SSLPlugin with the given configuration.- Parameters:
config- The configuration to use.
-
-
Method Details
-
apply
public void apply(@NotNull io.javalin.Javalin javalin) Method to apply the plugin to a Javalin instance- Specified by:
applyin interfaceio.javalin.plugin.Plugin- Parameters:
javalin- Javalin instance
-
patch
public void patch(@NotNull org.eclipse.jetty.server.Server server) Method to apply the SSLConfig to a given Jetty Server. Can be used to patch pre-existing or custom servers.- Parameters:
server- The Jetty Server to patch.
-