use of org.eclipse.jetty.util.security.Password in project jena by apache.
the class FusekiTestAuth method makeUserStore.
/** Very simple! */
private static UserStore makeUserStore(String user, String password, String role) {
Credential cred = new Password(password);
PropertyUserStore propertyUserStore = new PropertyUserStore();
String[] roles = role == null ? null : new String[] { role };
propertyUserStore.addUser(user, cred, roles);
try {
propertyUserStore.start();
} catch (Exception ex) {
throw new FusekiException("UserStore", ex);
}
return propertyUserStore;
}
Aggregations