Hello Kalle, I've finally got this to work :) Our other developer ended up
rewriting his code to be much friendlier to work with. Anyhow I have one
last question, he's returning a list of roles to me which I need to populate
SimpleAuthorizationInfo with. Could you explain how I would get the list of
roles into the doGetAuthorization method?

this is my code used to set my custom token
            
            page.class

            //hri crowd authentication
            HRILoginClient client = new HRILoginClient();
            HRISubject authenticate = client.authenticate(username,
password);

            //tapestry security authentication
            Subject currentUser = SecurityUtils.getSubject();
            HRIAuthenticationToken token = new
HRIAuthenticationToken(authenticate.getUsername());

            //Need to pass these roles into EPRSRealm
            System.out.println("roles" + authenticate.getRoles());

            currentUser.login(token);


    AuthorizationInfo in EPRSRealm.class

    //Not sure how to pass roles into this method.
    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection
principals) {

         Set<RoleNames> roleNames;
         return new SimpleAuthorizationInfo(roleNames);
    }

Thanks Kalle.




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/tapestry-security-w-Remote-Login-tp5505792p5678498.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to