So right now I create a new MutablePrincipalCollection

MutablePrincipalCollection principalCollection = new
SimplePrincipalCollection();
principalCollection.add(accountSecurity.getUsername(), getName());
principalCollection.add(accountSecurity.getUuid().toString(), getName());
String fingerprint = accountSecurity.getFingerprint();
if (fingerprint != null) {
  principalCollection.add(accountSecurity.getFingerprint(), getName());
}

But in order to get a particular value (They are all Strings) I need to
first call asList, then get it by index number. It would be nice if we could
name them. Then we could do something like

subject.getNamedPrincipal("Uuid")

Thanks

Mark



--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/Is-there-a-way-to-name-Principals-in-Subject-s-collection-tp7578647.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to