mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-21 09:05:10 +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");
|
registrationRequest.setEnrollmentID("appUser");
|
||||||
String enrollmentSecret = caClient.register(registrationRequest, admin);
|
String enrollmentSecret = caClient.register(registrationRequest, admin);
|
||||||
Enrollment enrollment = caClient.enroll("appUser", enrollmentSecret);
|
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);
|
wallet.put("appUser", user);
|
||||||
System.out.println("Successfully enrolled user \"appUser\" and imported it into the wallet");
|
System.out.println("Successfully enrolled user \"appUser\" and imported it into the wallet");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue