new IdentityService()
Methods
-
create(req, registrar)
-
Create a new identity with the Fabric CA server. An enrollment secret is returned which can then be used, along with the enrollment ID, to enroll a new identity. The caller must have `hf.Registrar` authority.
Parameters:
Name Type Description req
IdentityRequest The IdentityRequest registrar
User The identity of the registrar (i.e. who is performing the registration). Returns:
Return the secret of this new identity- Type
- Promise
-
delete(enrollmentID, registrar, force)
-
Delete an existing identity. The caller must have `hf.Registrar` authority.
Parameters:
Name Type Description enrollmentID
string registrar
User force
boolean Optional. With force, some identity can delete itself Returns:
- Type
- Promise
-
getAll(registrar)
-
Get all identities that the registrar is entitled to see.
Parameters:
Name Type Description registrar
User Required. The identity of the registrar (i.e. who is performing the registration). Returns:
- Type
- Promise
-
getOne(enrollmentID, registrar)
-
Get an identity. The caller must have `hf.Registrar` authority.
Parameters:
Name Type Description enrollmentID
string Required. The enrollment ID which uniquely identifies an identity registrar
User Required. The identity of the registrar (i.e. who is performing the registration). Returns:
- Type
- Promise
-
update(enrollmentID, req, registrar)
-
Update an existing identity. The caller must have `hf.Registrar` authority.
Parameters:
Name Type Description enrollmentID
string req
IdentityRequest registrar
User Returns:
- Type
- Promise