use of org.apache.jena.fuseki.auth.AuthPolicy in project jena by apache.
the class TestServiceDataAuthConfig method build.
public static FusekiServer build(int port, AuthPolicy policy) {
AuthPolicy policy12 = Auth.policyAllowSpecific("user1", "user2");
AuthPolicy policy13 = Auth.policyAllowSpecific("user1", "user3");
DatasetGraph dsg = DatasetGraphFactory.createTxnMem();
DataService.Builder dSrvBuilder = DataService.newBuilder(dsg);
dSrvBuilder.addEndpoint(Endpoint.create(Operation.Query, null, policy12));
dSrvBuilder.addEndpoint(Endpoint.create(Operation.Update, null, policy13));
DataService dSrv = dSrvBuilder.build();
FusekiServer server = FusekiServer.create().verbose(true).port(port).passwordFile("testing/Access/passwd").add("/db", dSrv).build();
return server;
}
Aggregations