Re: Authentication check interceptor

2006-03-23 Thread Jesse Kuhnert
I implemented almost the same exact interceptor for security purposes myself. If the goal is to get away from extending classes, which it is, then I would say interceptors sound like a better choice. I prefer composition over inheritance. On 3/23/06, Mike Snare <[EMAIL PROTECTED]> wrote: > > > >I

Re: Authentication check interceptor

2006-03-23 Thread Mike Snare
> >I can tell tapestry that the default base page is this page, but then > >pages that don't otherwise need a page class at all AND don't need the > >security check have to create a page class that extends BasePage just > >to avoid the security check. Seem pointless. > > > > > OK, I think I see yo

Re: Authentication check interceptor

2006-03-23 Thread Ryan Holmes
Mike Snare wrote: I originally did use a base page, but decided against it for a number of reasons. The first is that nearly all pages in the app are protected (it's a management app), so nearly every page would need to extend this base class just to get this otherwise free feature. I don't re

Re: Authentication check interceptor

2006-03-23 Thread Mike Snare
I originally did use a base page, but decided against it for a number of reasons. The first is that nearly all pages in the app are protected (it's a management app), so nearly every page would need to extend this base class just to get this otherwise free feature. I don't really like that. I ca

Re: Authentication check interceptor

2006-03-23 Thread Ryan Holmes
On the contrary, there's no code duplication involved - the logic is defined only once in a base page. If the only thing your pages have in common is the need to perform security checks, then that could be the sole purpose of the base page (and only protected pages need to extend it). Every pro

Re: Authentication check interceptor

2006-03-23 Thread Mike Snare
This has been entered as TAPESTRY-892 in JIRA https://issues.apache.org/jira/browse/TAPESTRY-892 Thanks again, -Mike On 3/23/06, Mike Snare <[EMAIL PROTECTED]> wrote: > will do... > > On 3/23/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: > > Yeah that would be great. If it allows it can you be su

Re: Authentication check interceptor

2006-03-23 Thread Mike Snare
will do... On 3/23/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: > Yeah that would be great. If it allows it can you be sure it's set to tap4 > and assigned to me? > > On 3/23/06, Mike Snare <[EMAIL PROTECTED]> wrote: > > > > Fantastic. Would you like me to enter an enhancement request so it > > c

Re: Authentication check interceptor

2006-03-23 Thread Jesse Kuhnert
Yeah that would be great. If it allows it can you be sure it's set to tap4 and assigned to me? On 3/23/06, Mike Snare <[EMAIL PROTECTED]> wrote: > > Fantastic. Would you like me to enter an enhancement request so it > can be tracked? > > -Mike > > On 3/23/06, Jesse Kuhnert <[EMAIL PROTECTED]> wro

Re: Authentication check interceptor

2006-03-23 Thread Mike Snare
Fantastic. Would you like me to enter an enhancement request so it can be tracked? -Mike On 3/23/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: > No nothing like that. The trigger is something that happens anyways, ie the > IDirect interface. > > This would just provide a method hook that gurarant

Re: Authentication check interceptor

2006-03-23 Thread Jesse Kuhnert
No nothing like that. The trigger is something that happens anyways, ie the IDirect interface. This would just provide a method hook that gurarantees the page you are after is all loaded up, and that no direct methods have been called on it yet. I'll try and do something. On 3/23/06, Mike Snare <

Re: Authentication check interceptor

2006-03-23 Thread Mike Snare
That certainly would work, but it seems to go against good practice on a number of levels, most importantly is that the same code (am i logged in ? continue : go to login with a possible callback) gets duplicated in every page. I'd hate to force every page to do this and I definitely don't want to

Re: Authentication check interceptor

2006-03-23 Thread Mike Snare
That would rock. As to the triggerDirect, do you mean I would be able to actually take a page that meets my requirements and trigger a direct to a method (effectively calling the method) without having to render the page? That would work ok, i think. Thanks, -Mike On 3/22/06, Jesse Kuhnert <[EM

Re: Authentication check interceptor

2006-03-23 Thread Ryan Holmes
It might be worth the effort to refactor your code so that security checks are performed in the pageValidate() method. This is a pretty standard approach and benefits in part from the fact that the target page is already loaded when creating callbacks, etc. There's a simple example in the VLib

Re: Authentication check interceptor

2006-03-22 Thread Jesse Kuhnert
That sounds pretty damn clear. I don't know if it's in the last release, but there is a method on DirectService at least that is called "triggerDirect" or something else similar..It would allow you to do what you describe. If not that, I wouldn't be opposed to adding an extension point of some sor