java.lang.Object
org.apache.jena.fuseki.jetty.JettyLib
Helpers for working with Jetty.
SecurityHandler
UserStore userStore = JettyLib.makeUserStore(...); SecurityHandler securityHandler = JettyLib.makeSecurityHandler(String pathSpec, String realm, UserStore userStore);
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic AuthScheme
Current auth modestatic final AuthScheme
Default setting. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addHandler
(org.eclipse.jetty.server.Server server, org.eclipse.jetty.server.Handler handler) Add or append aHandler
to a JettyServer
.static void
addPathConstraint
(org.eclipse.jetty.security.ConstraintSecurityHandler securityHandler, String pathSpec) static void
addPathConstraint
(org.eclipse.jetty.security.ConstraintSecurityHandler securityHandler, String pathSpec, String role) static org.eclipse.jetty.security.UserStore
static org.eclipse.jetty.security.UserStore
Make aUserStore
for a single user,password,rolestatic org.eclipse.jetty.server.HttpConfiguration
HTTP configuration with setting for Fuseki workload.static org.eclipse.jetty.security.ConstraintSecurityHandler
makeSecurityHandler
(String realm, org.eclipse.jetty.security.UserStore userStore) Create a JettySecurityHandler
for basic authentication.static org.eclipse.jetty.security.ConstraintSecurityHandler
makeSecurityHandler
(String realm, org.eclipse.jetty.security.UserStore userStore, String role, AuthScheme authMode) Create a JettySecurityHandler
for basic authentication.static org.eclipse.jetty.security.ConstraintSecurityHandler
makeSecurityHandler
(String realm, org.eclipse.jetty.security.UserStore userStore, AuthScheme authMode) Create a JettySecurityHandler
for basic authentication.static org.eclipse.jetty.security.SecurityHandler
makeSecurityHandlerForPathspec
(String pathSpec, String realm, org.eclipse.jetty.security.UserStore userStore) Create a JettySecurityHandler
for a specific pathSpace, e.g/database
.static org.eclipse.jetty.security.UserStore
makeUserStore
(String passwordFile) Make aUserStore
from a password file.static org.eclipse.jetty.security.UserStore
makeUserStore
(String user, String password) Make aUserStore
for a single user,password in any role.static org.eclipse.jetty.security.UserStore
makeUserStore
(String user, String password, String role) Make aUserStore
for a single user,password,rolestatic void
setMimeTypes
(org.eclipse.jetty.servlet.ServletContextHandler context) Add the RDF MIME Type mappins
-
Field Details
-
dftAuthMode
Default setting. -
authMode
Current auth mode
-
-
Constructor Details
-
JettyLib
public JettyLib()
-
-
Method Details
-
makeSecurityHandlerForPathspec
public static org.eclipse.jetty.security.SecurityHandler makeSecurityHandlerForPathspec(String pathSpec, String realm, org.eclipse.jetty.security.UserStore userStore) Create a JettySecurityHandler
for a specific pathSpace, e.g/database
. -
makeSecurityHandler
public static org.eclipse.jetty.security.ConstraintSecurityHandler makeSecurityHandler(String realm, org.eclipse.jetty.security.UserStore userStore) Create a JettySecurityHandler
for basic authentication. See addPathConstraint(ConstraintSecurityHandler, String) for adding thepathspec
to apply it to. -
makeSecurityHandler
public static org.eclipse.jetty.security.ConstraintSecurityHandler makeSecurityHandler(String realm, org.eclipse.jetty.security.UserStore userStore, AuthScheme authMode) Create a JettySecurityHandler
for basic authentication. See addPathConstraint(ConstraintSecurityHandler, String) for adding thepathspec
to apply it to. -
makeSecurityHandler
public static org.eclipse.jetty.security.ConstraintSecurityHandler makeSecurityHandler(String realm, org.eclipse.jetty.security.UserStore userStore, String role, AuthScheme authMode) Create a JettySecurityHandler
for basic authentication. See addPathConstraint(ConstraintSecurityHandler, String) for adding thepathspec
to apply it to. -
addPathConstraint
public static void addPathConstraint(org.eclipse.jetty.security.ConstraintSecurityHandler securityHandler, String pathSpec) -
addPathConstraint
-
makeUserStore
Make aUserStore
from a password file.PropertyUserStore
for details. -
makeUserStore
Make aUserStore
for a single user,password in any role. -
makeUserStore
public static org.eclipse.jetty.security.UserStore makeUserStore(String user, String password, String role) Make aUserStore
for a single user,password,role -
addUser
-
addUser
public static org.eclipse.jetty.security.UserStore addUser(org.eclipse.jetty.security.UserStore userStore, String user, String password, String role) Make aUserStore
for a single user,password,role -
addHandler
public static void addHandler(org.eclipse.jetty.server.Server server, org.eclipse.jetty.server.Handler handler) Add or append aHandler
to a JettyServer
. -
setMimeTypes
public static void setMimeTypes(org.eclipse.jetty.servlet.ServletContextHandler context) Add the RDF MIME Type mappins -
httpConfiguration
public static org.eclipse.jetty.server.HttpConfiguration httpConfiguration()HTTP configuration with setting for Fuseki workload. No "secure" settings.
-