mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Update RegisterUser.java (#428)
Use correct identity for the appUser (Not the same admin user certificates) Signed-off-by: dvrajitha <dvrajitha@gmail.com>
This commit is contained in:
parent
cbf263dc3b
commit
2b662e08b4
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ public class RegisterUser {
|
|||
registrationRequest.setEnrollmentID("appUser");
|
||||
String enrollmentSecret = caClient.register(registrationRequest, admin);
|
||||
Enrollment enrollment = caClient.enroll("appUser", enrollmentSecret);
|
||||
Identity user = Identities.newX509Identity("Org1MSP", adminIdentity.getCertificate(), adminIdentity.getPrivateKey());
|
||||
Identity user = Identities.newX509Identity("Org1MSP", enrollment);
|
||||
wallet.put("appUser", user);
|
||||
System.out.println("Successfully enrolled user \"appUser\" and imported it into the wallet");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue