Re: [Announce] Acegi Security library for Tapestry 5

2007-08-18 Thread Mark Helmstetter
One more question, have you been able to get logout to work?  I tried 
creating a simple link to /j_acegi_logout and to /app/j_acegi_logout 
which didn't seem to work.  I get a 404 not found.


It seems that the logout filter has not been created/initialized?

Thanks,
Mark

Robin Helgelin wrote:

On 8/18/07, Mark Helmstetter <[EMAIL PROTECTED]> wrote:
  

Do you have any examples of how to implement the login form/page?  I'd
certainly much prefer to implement this as a Tapestry page rather than
other approaches that use JSP.  How will login errors be reported on the
login page?



There is a small example application available here:
http://www.localhost.nu/svn/public/tapestry5-acegi-example/

Currently I'm using the acegi.failure.url application option to give
information that the login didn't work out. If you have other idea,
just shoot them over here :)

  




Re: [Announce] Acegi Security library for Tapestry 5

2007-08-18 Thread Mark Helmstetter

Robin Helgelin wrote:

On 8/18/07, Mark Helmstetter <[EMAIL PROTECTED]> wrote:
  

Do you have any examples of how to implement the login form/page?  I'd
certainly much prefer to implement this as a Tapestry page rather than
other approaches that use JSP.  How will login errors be reported on the
login page?



There is a small example application available here:
http://www.localhost.nu/svn/public/tapestry5-acegi-example/

Currently I'm using the acegi.failure.url application option to give
information that the login didn't work out. If you have other idea,
just shoot them over here :)
  
Thanks Robin, I just found the example app, and I've got it working 
now.  I think that is really all that is needed for the login failure case.


There's still a lot that's going on here that I don't quite understand, 
but most of that is due to my lack of understanding of how all of the T5 
IoC magic works.  I'd really prefer to have a bit more control over how 
the Acegi classes are configured, and to do so using a more 
"traditional" Spring-based approach.  I managed to do this for the 
injection of the UserDetailsService by omitting the binder.bind() call 
in the AppModule. I was unable to do this with the 
daoAuthenticationProvider, resulting in the error "Service id 
'daoAuthenticationProvider' has already been defined.".  It looks like 
I'd need to modify the SecurityModule to do this.


Overall though, I'm really happy with it, and thanks to you and Ivan for 
your contribution.


Mark



Re: [Announce] Acegi Security library for Tapestry 5

2007-08-18 Thread Mark Helmstetter
Do you have any examples of how to implement the login form/page?  I'd 
certainly much prefer to implement this as a Tapestry page rather than 
other approaches that use JSP.  How will login errors be reported on the 
login page?


I think (hope) I can figure out how to adapt the example from the 
approaches I've seen in T4, but I suspect this is going to take a lot of 
digging.


Thanks,
Mark

Robin Helgelin wrote:

Hi,

Thanks to Ivan Dubrov I've been able to put together an Acegi Security
library for T5. My idea was a library similar to James Carman's
tapestry-acegi for T4.

Basic usage is that it works with the @Secured annotation. Currently
only class level, but page listeners is planned.

There are also a few components planned to make things easier, but
this is merely "get it out of the door release". :-).

More information and example usage and application can be found here:
http://www.localhost.nu/java/tapestry5-acegi/

  



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



Ajax Double Combo example?

2006-09-23 Thread Mark Helmstetter

Are there any examples of how to implement an Ajax enabled double combo
box?  Is there a component that supports this?

I was hoping for something simple for those of us who are uh,
ajax-challenged...  I looked through Tacos and didn't see anything.

Thanks,
Mark


Injected HttpServletRequest does not match cycle.requestContext.request

2006-06-06 Thread Mark Helmstetter
Why is the injected HttpServletRequest not compatible with the 
HttpServletRequest
obtained via the deprecated getRequestCycle().getRequestContext().getRequest()?


public abstract class LoginPage extends BasePage implements 
PageBeginRenderListener {

@InjectObject("service:tapestry.globals.HttpServletRequest")
public abstract HttpServletRequest getServletRequest();

public void pageBeginRender(PageEvent event) {
  // This works
  HttpServletRequest request =
event.getRequestCycle().getRequestContext().getRequest();
  SecurityContextHolderAwareRequestWrapper r =
(SecurityContextHolderAwareRequestWrapper)request;

  // This throws ClassCastException
  HttpServletRequest request2 = getServletRequest();
  SecurityContextHolderAwareRequestWrapper r2 =
(SecurityContextHolderAwareRequestWrapper)request2;
}
}


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



Tapestry 4 / Acegi integration examples

2006-06-05 Thread Mark Helmstetter
Can anyone provide or point me to a simple example of Tapestry 4 integrated with
Acegi that includes friendly urls and External (bookmarkable) links that are 
public?

I've looked at numerous examples and guides, and several sample applications 
such as
AppFuse and Trails and it seems to me that all of these assume that everything 
is
secure. I want something like a typical Amazon, eBay-like e-commerce app where 
you
can browse 90% of the application without being logged in.

I thought that I could put my "secure" pages under context/pages/secure and
configure my Acegi filter appropriately, but I can't seem to get that to work. I
think maybe I need a second ServiceEncoder to handle this additional path.

It seems like there has to be a better way to do all this, but maybe it's just
because I'm fairly new to Tapestry.

Thanks,
Mark


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