Like the code described in user manual :
LoginContext ctx = new LoginContext("karaf", handler);
ctx.login();
authenticated = true;
subject = ctx.getSubject();
for (Principal p : subject.getPrincipals()) {
if ((p instanceof Group) && ("ROLES".equalsIgnoreCase(p.getName()))) {
Group g = (Group) p;
Enumeration<? extends Principal> members = g.members();
while (members.hasMoreElements()) {
Principal member = members.nextElement();
roles.add(member.getName());
}
}
}
Is this somewhere in jaas ? =)
--
View this message in context:
http://karaf.922171.n3.nabble.com/Jaas-realm-problem-tp4031391p4031456.html
Sent from the Karaf - User mailing list archive at Nabble.com.