code: func (constraints *tokenConstraints) validate() (err error) {
  	keys := 0
  	if constraints.key != nil {
  		keys++
  	}
  	if constraints.secret != "" {
  		keys++
  	}
  	if keys > 1 {
  		err = fmt.Errorf("duplicate key constraints")
  		return
  	}
  	if keys < 1 {
  		err = fmt.Errorf("no key constraint")
  		return
  	}
  	return
  }
docs: // validate validates the constraints argument.