hfc.fabric_ca.identityService

Module Contents

Classes

IdentityService(client)

hfc.fabric_ca.identityService._logger
class hfc.fabric_ca.identityService.IdentityService(client)

Bases: object

create(self, registrar, enrollmentID, enrollmentSecret=None, role=None, affiliation=None, maxEnrollments=1, attrs=None)

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
  • registrar – registrar

  • enrollmentID – enrollmentID ID which will be used for enrollment

  • enrollmentSecret – enrollmentSecret Optional enrollment secret to set for the registered user.

If not provided, the server will generate one. When not including, use a null for this parameter.(Default value = None) :param role: Optional type of role for this user. When not including, use a null for this parameter. (Default value = None) :param affiliation: Affiliation with which this user will be associated (Default value = None) :param maxEnrollments: The maximum number of times the user is permitted to enroll (Default value = 1) :param attrs: Array of key/value attributes to assign to the user. (Default value = None) :return: The enrollment secret to use when this user enrolls :raises RequestException: errors in requests.exceptions :raises ValueError: Failed response, json parse error, args missing

getOne(self, enrollmentID, registrar)
getAll(self, registrar)
delete(self, enrollmentID, registrar, force=False)
update(self, enrollmentID, registrar, type=None, affiliation=None, maxEnrollments=None, attrs=None, enrollmentSecret=None, caname=None)