diff --git a/examples/authz-example/pom.xml b/examples/authz-example/pom.xml
index 8438124..deb93ad 100644
--- a/examples/authz-example/pom.xml
+++ b/examples/authz-example/pom.xml
@@ -18,7 +18,7 @@
com.aserto
aserto-java
- 0.20.10
+ 0.21.00
diff --git a/examples/authz-example/src/main/java/org/example/AuthzExample.java b/examples/authz-example/src/main/java/org/example/AuthzExample.java
index 26cdb61..500c2f8 100644
--- a/examples/authz-example/src/main/java/org/example/AuthzExample.java
+++ b/examples/authz-example/src/main/java/org/example/AuthzExample.java
@@ -1,8 +1,8 @@
package org.example;
import com.aserto.AuthorizerClient;
-import com.aserto.AuthzClient;
import com.aserto.ChannelBuilder;
+import com.aserto.authorizer.AuthzClient;
import com.aserto.authorizer.v2.Decision;
import com.aserto.authorizer.v2.api.IdentityType;
import com.aserto.model.IdentityCtx;
diff --git a/examples/directory-example/pom.xml b/examples/directory-example/pom.xml
index 1c9e8fe..2201a89 100644
--- a/examples/directory-example/pom.xml
+++ b/examples/directory-example/pom.xml
@@ -18,7 +18,7 @@
com.aserto
aserto-java
- 0.20.10
+ 0.21.00
diff --git a/examples/directory-example/src/main/java/org/example/DirectoryExample.java b/examples/directory-example/src/main/java/org/example/DirectoryExample.java
index 4874f83..be0010e 100644
--- a/examples/directory-example/src/main/java/org/example/DirectoryExample.java
+++ b/examples/directory-example/src/main/java/org/example/DirectoryExample.java
@@ -1,19 +1,21 @@
package org.example;
import com.aserto.ChannelBuilder;
-import com.aserto.directory.v3.DirectoryClient;
import com.aserto.directory.common.v3.ObjectIdentifier;
import com.aserto.directory.reader.v3.GetObjectManyResponse;
import com.aserto.directory.reader.v3.GetObjectResponse;
import com.aserto.directory.reader.v3.GetObjectsResponse;
+import com.aserto.directory.v3.DirectoryClient;
+
import com.aserto.directory.v3.Directory;
+import com.aserto.directory.v3.UninitilizedClientException;
import io.grpc.ManagedChannel;
import javax.net.ssl.SSLException;
import java.util.List;
public class DirectoryExample {
- public static void main(String[] args) throws SSLException {
+ public static void main(String[] args) throws SSLException, UninitilizedClientException {
// create a channel that has the connection details
ManagedChannel channel = new ChannelBuilder()
.withHost("localhost")
@@ -29,19 +31,19 @@ public static void main(String[] args) throws SSLException {
getObjectManyRequest(directoryClient);
}
- public static void getUserExample(DirectoryClient directoryClient) {
+ public static void getUserExample(DirectoryClient directoryClient) throws UninitilizedClientException {
System.out.println("------ Get user example ------");
GetObjectResponse getObjectResponse = directoryClient.getObject("user", "morty@the-citadel.com", false);
System.out.println(getObjectResponse);
}
- public static void getUsersExample(DirectoryClient directoryClient) {
+ public static void getUsersExample(DirectoryClient directoryClient) throws UninitilizedClientException {
System.out.println("------ Get users example ------");
GetObjectsResponse getObjectsResponse = directoryClient.getObjects("user", 100, "");
System.out.println(getObjectsResponse);
}
- public static void getObjectManyRequest(DirectoryClient directoryClient) {
+ public static void getObjectManyRequest(DirectoryClient directoryClient) throws UninitilizedClientException {
System.out.println("------ Get object many example ------");
List objects = List.of(
Directory.buildObjectIdentifier("user", "rick@the-citadel.com"),