Search code examples
realmshiroprincipal

How can be a realm has multiple principals in shiro?


There's a method of PrincipalCollection : Collection fromRealm(String realmName) , but how can be one login assign muiltiple Principals to a realm? Thank you


Solution

  • Sure, you could create a realm to log into with certificates, so you could have a cert based principal, but you might have a username principal as well. Or you could have a custom principal that puts both of these attributes in a single object.