code: func (c *CAClientImpl) Enroll(request *api.EnrollmentRequest) error {
  
  	if c.adapter == nil {
  		return fmt.Errorf("no CAs configured for organization: %s", c.orgName)
  	}
  	if request.Name == "" {
  		return errors.New("enrollmentID is required")
  	}
  	if request.Secret == "" {
  		return errors.New("enrollmentSecret is required")
  	}
  	// TODO add attributes
  	cert, err := c.adapter.Enroll(request)
  	if err != nil {
  		return errors.Wrap(err, "enroll failed")
  	}
  	userData := &msp.UserData{
  		MSPID:                 c.orgMSPID,
  		ID:                    request.Name,
  		EnrollmentCertificate: cert,
  	}
  	err = c.userStore.Store(userData)
  	if err != nil {
  		return errors.Wrap(err, "enroll failed")
  	}
  	return nil
  }
docs: // Enroll a registered user in order to receive a signed X509 certificate.
  // A new key pair is generated for the user. The private key and the
  // enrollment certificate issued by the CA are stored in SDK stores.
  // They can be retrieved by calling IdentityManager.GetSigningIdentity().
  //
  // enrollmentID The registered ID to use for enrollment
  // enrollmentSecret The secret associated with the enrollment ID