code: func (i *Identity) HasPrincipals(additionalPrincipals []string) bool {
  	set := utils.StringsSet(i.Cert.ValidPrincipals)
  	for _, principal := range additionalPrincipals {
  		if _, ok := set[principal]; !ok {
  			return false
  		}
  	}
  	return true
  }
docs: // HasPrincipals returns whether identity has principals