Hi,
I am still trying to make tapestry + Acegi to work together and I have had
some success... I have followed the AcegiSpringJave5 Wiki and some
additional codes provided by Robin Ericsson.

In my solution now I get authenticated but I dont get redirected to the
right page... I end up back on the login page.

I have put in some System.out in the onLogin mehtod and I got this output.

10:08:43,328 INFO  [STDOUT] trying to authenticate...
10:08:43,343 INFO  [STDOUT] authResult =
[EMAIL PROTECTED]:
Usern
ame: [EMAIL PROTECTED]: Username: WILLS; Password:
[PROTECTED]; Enabled: true; AccountNonExpired: tru
e; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities:
ROLE_REP_ADMIN, ROLE_USER; Password: [PROTE
CTED]; Authenticated: true; Details:
[EMAIL PROTECTED]: RemoteIpAddress: 127.0.0.1;
Sessio
nId: 1689E2C5A526D7C2E889C995E8A036B5; Granted Authorities: ROLE_REP_ADMIN,
ROLE_USER
10:08:43,343 INFO  [STDOUT] *************************** Validated true
10:08:43,343 INFO  [STDOUT] auth name = WILLS
10:08:43,359 INFO  [STDOUT] auth getCredentials = dunder
10:08:43,359 INFO  [STDOUT] auth getDetails =
[EMAIL PROTECTED]: RemoteIpAddress: 127.0.0.
1; SessionId: 1689E2C5A526D7C2E889C995E8A036B5
10:08:43,359 INFO  [STDOUT] auth getPrincipal =
[EMAIL PROTECTED]: Username: WILLS; Password: [PROTEC
TED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true;
AccountNonLocked: true; Granted Authorities:
ROLE_REP_ADMIN, ROLE_USER


And on my page I am trying to get to I have this annotation:
@Secured({"ROLE_REP_ADMIN", "ROLE_USER"})

My onLogin method looks like this:
                      if( !getProcessingFilter().attemptAuthentication(
getUserName(), getPassword() ) ) {
                                
System.out.println("**************************** Invalid acegi login");
                        } else {
                                System.out.println("*************************** 
Validated true");
                                
                                Authentication auth =
SecurityContextHolder.getContext().getAuthentication();
                                if( auth != null ) {
                                            System.out.println("auth name = " + 
auth.getName());
                                            System.out.println("auth 
getCredentials = " +
auth.getCredentials());
                                            System.out.println("auth getDetails 
= " +
auth.getDetails());
                                            System.out.println("auth 
getPrincipal = " +
auth.getPrincipal());
                               }                                
                                
                                log.info("Logged User : " + user.getUserName());
                                setUsernameAndPasswordToSession(username, 
password);
                                
getAppUserService().createNewLoginEventForUser(getUserName(), ipNumber,
resolution, getBrowser(), null, false);
                                throw new 
PageRedirectException(WebAdminTemplatePage.PAGE_NAME);
                        }


I also tried to use return PAGE_NAME instead of throw PageRedirectException
but there is no difference.

Does anybody know how to solve this?

Thanks,
Jacob


-- 
View this message in context: 
http://www.nabble.com/Still-having-some-problem-with-Tapestry-%2B-Acegi-tf3214425.html#a8926446
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to