code: func NewHandlerFromSigner(signer signer.Signer) (h *api.HTTPHandler, err error) {
  	policy := signer.Policy()
  	if policy == nil {
  		err = errors.New(errors.PolicyError, errors.InvalidPolicy)
  		return
  	}
  
  	// Sign will only respond for profiles that have no auth provider.
  	// So if all of the profiles require authentication, we return an error.
  	haveUnauth := (policy.Default.Provider == nil)
  	for _, profile := range policy.Profiles {
  		haveUnauth = haveUnauth || (profile.Provider == nil)
  	}
  
  	if !haveUnauth {
  		err = errors.New(errors.PolicyError, errors.InvalidPolicy)
  		return
  	}
  
  	return &api.HTTPHandler{
  		Handler: &Handler{
  			signer: signer,
  		},
  		Methods: []string{"POST"},
  	}, nil
  }
docs: // NewHandlerFromSigner generates a new Handler directly from
  // an existing signer.