Skip to content

[help needed]How to create account from operator with JAVA ? #577

Answered by licheng5625
licheng5625 asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not exactly sure, but for now, do the JwtUtils help? https://github.com/nats-io/nats.java/blob/main/src/main/java/io/nats/client/support/JwtUtils.java

I don't know if the unit test will give more information either, but here it is: https://github.com/nats-io/nats.java/blob/main/src/test/java/io/nats/client/support/JwtUtilsTests.java

Also I suppose you've already read this: https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/jwt

Hi, thanks so much for your reply. The unit test and JWTUtils are helpful for creating a user. We are struggling with how to create an acount.
The different between creating account and user is, account' JWT contains a signing_key.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@licheng5625
Comment options

Answer selected by licheng5625
Comment options

You must be logged in to vote
1 reply
@licheng5625
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #572 on December 21, 2021 12:11.