[help needed]How to create account from operator with JAVA ? #577
-
| Hi experts, 
 Is this solution correct ? We can create a nkey for account: But we are confused when we construct the JWT for account. the decoded JWT of account looks like this : How to fill in the  Is there any example ? Thank and best regards | 
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
| 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 | 
Beta Was this translation helpful? Give feedback.
-
| 
 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. | 
Beta Was this translation helpful? Give feedback.
-
| @licheng5625 converted to discussion | 
Beta Was this translation helpful? Give feedback.
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.