Comments (3)
The tests do so in a similar fashion here: https://github.com/authzed/authzed-java/blob/main/src/intTest/java/V1ClientTest.java#L54
What version of the client and of Java are you using?
from authzed-java.
Yes, the test code matches up with the README and my understanding of using the stub.
I'm using Java 17 and the 0.3.0 version of the JAR. Is the issue with PermissionsServiceBlockingStub class? On inspection, there is no withCallCredentials() method
public static final class PermissionsServiceBlockingStub extends AbstractBlockingStub<PermissionsServiceBlockingStub> {
private PermissionsServiceBlockingStub(Channel channel, CallOptions callOptions) {
super(channel, callOptions);
}
protected PermissionsServiceBlockingStub build(Channel channel, CallOptions callOptions) {
return new PermissionsServiceBlockingStub(channel, callOptions);
}
public Iterator<PermissionService.ReadRelationshipsResponse> readRelationships(PermissionService.ReadRelationshipsRequest request) {
return ClientCalls.blockingServerStreamingCall(this.getChannel(), PermissionsServiceGrpc.getReadRelationshipsMethod(), this.getCallOptions(), request);
}
public PermissionService.WriteRelationshipsResponse writeRelationships(PermissionService.WriteRelationshipsRequest request) {
return (PermissionService.WriteRelationshipsResponse)ClientCalls.blockingUnaryCall(this.getChannel(), PermissionsServiceGrpc.getWriteRelationshipsMethod(), this.getCallOptions(), request);
}
public PermissionService.DeleteRelationshipsResponse deleteRelationships(PermissionService.DeleteRelationshipsRequest request) {
return (PermissionService.DeleteRelationshipsResponse)ClientCalls.blockingUnaryCall(this.getChannel(), PermissionsServiceGrpc.getDeleteRelationshipsMethod(), this.getCallOptions(), request);
}
public PermissionService.CheckPermissionResponse checkPermission(PermissionService.CheckPermissionRequest request) {
return (PermissionService.CheckPermissionResponse)ClientCalls.blockingUnaryCall(this.getChannel(), PermissionsServiceGrpc.getCheckPermissionMethod(), this.getCallOptions(), request);
}
public PermissionService.ExpandPermissionTreeResponse expandPermissionTree(PermissionService.ExpandPermissionTreeRequest request) {
return (PermissionService.ExpandPermissionTreeResponse)ClientCalls.blockingUnaryCall(this.getChannel(), PermissionsServiceGrpc.getExpandPermissionTreeMethod(), this.getCallOptions(), request);
}
public Iterator<PermissionService.LookupResourcesResponse> lookupResources(PermissionService.LookupResourcesRequest request) {
return ClientCalls.blockingServerStreamingCall(this.getChannel(), PermissionsServiceGrpc.getLookupResourcesMethod(), this.getCallOptions(), request);
}
public Iterator<PermissionService.LookupSubjectsResponse> lookupSubjects(PermissionService.LookupSubjectsRequest request) {
return ClientCalls.blockingServerStreamingCall(this.getChannel(), PermissionsServiceGrpc.getLookupSubjectsMethod(), this.getCallOptions(), request);
}
}
from authzed-java.
Same problem here.
To be able to use GRPC, additional imports are necessary (taken from GRPC Java example):
implementation "com.authzed.api:authzed:0.4.0"
implementation 'io.grpc:grpc-protobuf:1.54.0'
implementation 'io.grpc:grpc-stub:1.54.0'
compileOnly 'org.apache.tomcat:annotations-api:6.0.53'
runtimeOnly 'io.grpc:grpc-netty-shaded:1.54.0'
Please update this example with a working one. When checking this code out, it does not compile as no Authzed classes are found (V1ClientTest.java
). After adding implementation "com.authzed.api:authzed:0.4.0"
to the build.gradle
file as dependency, this is fixed too.
from authzed-java.
Related Issues (8)
- Add utility function for Bearer Token authentication HOT 1
- Provide examples from other JVM languages HOT 1
- Regenerate for v1 API and add examples HOT 1
- BearerToken not present in com.authzed.api maven import HOT 1
- Generated LookupSubjectsRequest missing optional_concrete_limit in v0.5.0 HOT 3
- gRPC version is out of sync in readme documentation, causing `NAME_RESOLUTION_DELAYED` errors
- Bulk import java client types inaccuracy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from authzed-java.