code: func (c *fabricCAAdapter) Register(key core.Key, cert []byte, request *api.RegistrationRequest) (string, error) {
  	// Construct request for Fabric CA client
  	var attributes []caapi.Attribute
  	for i := range request.Attributes {
  		attributes = append(attributes, caapi.Attribute{Name: request.Attributes[i].Name, Value: request.Attributes[i].Value, ECert: request.Attributes[i].ECert})
  	}
  	var req = caapi.RegistrationRequest{
  		CAName:         request.CAName,
  		Name:           request.Name,
  		Type:           request.Type,
  		MaxEnrollments: request.MaxEnrollments,
  		Affiliation:    request.Affiliation,
  		Secret:         request.Secret,
  		Attributes:     attributes}
  
  	registrar, err := c.newIdentity(key, cert)
  	if err != nil {
  		return "", errors.Wrap(err, "failed to create CA signing identity")
  	}
  
  	response, err := registrar.Register(&req)
  	if err != nil {
  		return "", errors.Wrap(err, "failed to register user")
  	}
  
  	return response.Secret, nil
  }
docs: // Register handles user registration
  // key: registrar private key
  // cert: registrar enrollment certificate
  // request: Registration Request
  // Returns Enrolment Secret