Skip to content

Commit ee7168b

Browse files
authored
Merge pull request #111 from authzed/update-version-and-snippet
updates version in README and snippet
2 parents 2b6b8fc + fdd0a18 commit ee7168b

1 file changed

Lines changed: 16 additions & 18 deletions

File tree

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can find more info on each API on the [SpiceDB API reference documentation].
1919
Additionally, Protobuf API documentation can be found on the [Buf Registry SpiceDB API repository].
2020
Documentation for the latest Java client release is available as [Javadoc].
2121

22-
See [CONTRIBUTING.md] for instructions on how to contribute and perform common tasks like building the project and running tests.
22+
See [CONTRIBUTING.md] for instructions on contributing and performing common tasks like building the project and running tests.
2323

2424
[Authzed]: https://authzed.com
2525
[SpiceDB]: https://github.com/authzed/spicedb
@@ -32,7 +32,7 @@ See [CONTRIBUTING.md] for instructions on how to contribute and perform common t
3232

3333
We highly recommend following the **[Protecting Your First App]** guide to learn the latest best practice to integrate an application with SpiceDB.
3434

35-
If you're interested in examples for a specific version of the API, they can be found in their respective folders in the [examples directory].
35+
If you're interested in examples for a specific API version, they can be found in their respective folders in the [examples directory].
3636

3737
[Protecting Your First App]: https://authzed.com/docs/guides/first-app
3838
[examples directory]: /examples
@@ -51,17 +51,17 @@ Most commonly, if you are using [Maven] you can add the following to your pom.xm
5151
<dependency>
5252
<groupId>com.authzed.api</groupId>
5353
<artifactId>authzed</artifactId>
54-
<version>0.11.0</version>
54+
<version>v1.0.0</version>
5555
</dependency>
5656
<dependency>
5757
<groupId>io.grpc</groupId>
5858
<artifactId>grpc-protobuf</artifactId>
59-
<version>1.62.2</version>
59+
<version>1.66.0</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>io.grpc</groupId>
6363
<artifactId>grpc-stub</artifactId>
64-
<version>1.62.2</version>
64+
<version>1.66.0</version>
6565
</dependency>
6666
</dependencies>
6767
```
@@ -70,9 +70,9 @@ If you are using [Gradle] then add the following to your `build.gradle` file:
7070

7171
```groovy
7272
dependencies {
73-
implementation "com.authzed.api:authzed:0.7.0"
74-
implementation 'io.grpc:grpc-protobuf:1.62.2'
75-
implementation 'io.grpc:grpc-stub:1.62.2'
73+
implementation "com.authzed.api:authzed:v1.0.0"
74+
implementation 'io.grpc:grpc-protobuf:1.66.0'
75+
implementation 'io.grpc:grpc-stub:1.66.0'
7676
}
7777
```
7878

@@ -85,7 +85,7 @@ dependencies {
8585

8686
Because of how [grpc-java] is designed, there is little in terms of abstraction over the gRPC APIs underpinning Authzed.
8787
A `ManagedChannel` will establish a connection to Authzed that can be shared with _stubs_ for each gRPC service.
88-
In order to successfully authenticate with the API, you will have to provide a [Bearer Token] with your own API Token
88+
To successfully authenticate with the API, you will have to provide a [Bearer Token] with your own API Token
8989
from the [Authzed dashboard] or your local SpiceDB instance in place of `t_your_token_here_1234567deadbeef` as
9090
`CallCredentials` for each stub:
9191

@@ -139,9 +139,7 @@ The following example initializes a permission client, performs a `CheckPermissi
139139
```java
140140
package org.example;
141141

142-
import com.authzed.api.v1.Core;
143-
import com.authzed.api.v1.PermissionService;
144-
import com.authzed.api.v1.PermissionsServiceGrpc;
142+
import com.authzed.api.v1.*;
145143
import com.authzed.grpcutil.BearerToken;
146144
import io.grpc.ManagedChannel;
147145
import io.grpc.ManagedChannelBuilder;
@@ -159,20 +157,20 @@ public class ClientExample {
159157
.withCallCredentials(bearerToken);
160158

161159

162-
PermissionService.CheckPermissionRequest request = PermissionService.CheckPermissionRequest.newBuilder()
160+
CheckPermissionRequest request = CheckPermissionRequest.newBuilder()
163161
.setConsistency(
164-
PermissionService.Consistency.newBuilder()
162+
Consistency.newBuilder()
165163
.setMinimizeLatency(true)
166164
.build())
167165
.setResource(
168-
Core.ObjectReference.newBuilder()
166+
ObjectReference.newBuilder()
169167
.setObjectType("blog/post")
170168
.setObjectId("1")
171169
.build())
172170
.setSubject(
173-
Core.SubjectReference.newBuilder()
171+
SubjectReference.newBuilder()
174172
.setObject(
175-
Core.ObjectReference.newBuilder()
173+
ObjectReference.newBuilder()
176174
.setObjectType("blog/user")
177175
.setObjectId("emilia")
178176
.build())
@@ -182,7 +180,7 @@ public class ClientExample {
182180

183181
// Is Emilia in the set of users that can read post #1?
184182
try {
185-
PermissionService.CheckPermissionResponse response = permissionsService.checkPermission(request);
183+
CheckPermissionResponse response = permissionsService.checkPermission(request);
186184
System.out.println("result: " + response.getPermissionship().getValueDescriptor().getName());
187185
} catch (Exception e) {
188186
System.out.println("Failed to check permission: " + e.getMessage());

0 commit comments

Comments
 (0)