So after some investigation I have concluded that the only logical place I
can see to inject the desired credentials into my Principal Object is in the
doGetAuthenticationInfo() in my realm. Specifically:

new SimpleAuthenticationInfo(username, password.toCharArray(), getName());

Where the username is a String. I have a new method called
getUuidForUser(String username) that I'm using to retrieve the user uuid...
this is where I come unstuck! I now have two strings; username and uuid and
I just can't seem to be able to find a way of adding them to the
SimpleAuthenticationInfo! I have tried a String[], hash, list etc. but
whenever I have more than just the username the authentication fails.

Of course I might be completely on the wrong path here!

Thanks



tarka wrote
> 
> At the moment when I place a request to
> SecurityUtils.getSubject().getPrincipal().toString(); I get the username
> returned. I would like to be able to obtain the user uuid.
> 

--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/How-to-set-Principals-tp7490972p7529722.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to