Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 8f1d587

Browse files
committed
[FAB-3162] Add optional secret param
Parameter added to fabric-ca user registration Change-Id: I3227cfcb9d90e51f694eda14710d3d19a652f946 Signed-off-by: Divyank Katira <Divyank.Katira@securekey.com>
1 parent 7939eab commit 8f1d587

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fabric-ca-client/fabricca.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ type RegistrationRequest struct {
6262
Attributes []Attribute
6363
// CAName is the name of the CA to connect to
6464
CAName string
65+
// Secret is an optional password. If not specified,
66+
// a random secret is generated. In both cases, the secret
67+
// is returned from registration.
68+
Secret string
6569
}
6670

6771
// RevocationRequest defines the attributes required to revoke credentials with the CA
@@ -219,6 +223,7 @@ func (fabricCAServices *services) Register(registrar fabricclient.User,
219223
Type: request.Type,
220224
MaxEnrollments: request.MaxEnrollments,
221225
Affiliation: request.Affiliation,
226+
Secret: request.Secret,
222227
Attributes: attributes}
223228
// Make registration request
224229
response, err := identity.Register(&req)

0 commit comments

Comments
 (0)