You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nice to see that you are working on a Java SDK for the clerk backend! Really eager to replace our internal clerk library with this project.
However, I encountered the following issue:
When retrieving the details of a user, the public metadata (as well as unsafe and private metadata) just returns an object of an empty wrapper class. Do I have to subclass or parse the metadata somehow to get a usable object?
Here is an example:
packagehello.world;
importcom.clerk.backend_api.Clerk;
importcom.clerk.backend_api.models.operations.GetUserResponse;
importjava.lang.Exception;
publicclassApplication {
publicstaticvoidmain(String[] args) throwsException {
try {
Clerksdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();
GetUserResponseres = sdk.users().get()
.userId("<value>")
.call();
if (res.user().isPresent()) {
varuser = res.user().get();
if (user.publicMetadata().isPresent()) {
// This is just an empty object with no methodsvarpublicMetadata = user.publicMetadata().get();
// What do I have to do here to get the actual metadata?
}
}
} catch (Exceptione) {
throwe;
}
}
}
The text was updated successfully, but these errors were encountered:
Hi Clerk-Team,
nice to see that you are working on a Java SDK for the clerk backend! Really eager to replace our internal clerk library with this project.
However, I encountered the following issue:
When retrieving the details of a user, the public metadata (as well as unsafe and private metadata) just returns an object of an empty wrapper class. Do I have to subclass or parse the metadata somehow to get a usable object?
Here is an example:
The text was updated successfully, but these errors were encountered: