You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jan Vissers <Ja...@cumquat.nl> on 2007/05/22 11:00:51 UTC
Tapestry 4+ and JAAS - any pointers?
Hi,
How would one incorporate JAAS into Tapestry 4+.
We already have a login module, but need help to tie it in to the framework.
Thanks,
-J.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Can someone tell me how to make donations to Tapestry
Posted by Howard Lewis Ship <hl...@gmail.com>.
The best way to contribute is to use the software, especially the
snapshots, and provide feedback and PATCHES.
The second best way to contribute is to evangelize Tapestry; talk to
your local Java Users Group, or blog about your (hopefully positive)
experiences.
Lastly, and there is precedent, if you want to fund the development of
an aspect of Tapestry, that's a possibility, please contact myself or
another member of the team.
On 6/24/07, Celia Mou <ce...@ocean7.com> wrote:
> Hi,
>
> Does anything know what the best way is to donate to the Tapestry
> project? I didn't find any mechanism on the Tapestry site.
>
> Thanks a lot!
>
> celia
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Can someone tell me how to make donations to Tapestry
Posted by Celia Mou <ce...@ocean7.com>.
Hi,
Does anything know what the best way is to donate to the Tapestry
project? I didn't find any mechanism on the Tapestry site.
Thanks a lot!
celia
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry 4+ and JAAS - any pointers?
Posted by Geoff Callender <ge...@mac.com>.
Forgot to mention that the superclass must implement
PageValidateListener. This tells Tapestry to invoke our pageValidate
(PageEvent) method. BTW, my solution has not been tested in anger.
On 23/05/2007, at 2:01 AM, Geoff Callender wrote:
> From trial and error I came up with this a little while ago, but
> there may be a better way,,,
>
> At login, save the LoginContext into an application scoped object -
> in this example it's called MyVisit. Then in your superclass of
> all pages that require authorisation, do this...
>
> /**
> * pageValidate - ensure the user is logged in.
> */
> public void pageValidate(PageEvent event) {
> Visit visit = getMyVisit();
>
> // If you're not logged in, then we go to the login page.
>
> if (visit == null || !visit.isLoggedIn()) {
> redirectToLoginPage();
> }
>
> // Is this too expensive to have here, or should it be
> called on demand?
> reEstablishLogin();
> }
>
> protected void reEstablishLogin() {
> // re-establish my JAAS login
> try {
> getMyVisit().getLoginContext().login();
> } catch (LoginException e) {
> redirectToLoginPage();
> }
> }
>
> private void redirectToLoginPage() {
> LoginPage login = (LoginPage) getRequestCycle().getPage
> ("pages/login/LoginPage");
> login.setCallback(new PageCallback(this));
> throw new PageRedirectException(login);
> }
>
> Any JAAS aficionados out there?
>
> HTH,
>
> Geoff
>
> On 22/05/2007, at 7:00 PM, Jan Vissers wrote:
>
>> Hi,
>>
>> How would one incorporate JAAS into Tapestry 4+.
>> We already have a login module, but need help to tie it in to the
>> framework.
>>
>> Thanks,
>> -J.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
Re: Tapestry 4+ and JAAS - any pointers?
Posted by Geoff Callender <ge...@mac.com>.
From trial and error I came up with this a little while ago, but
there may be a better way,,,
At login, save the LoginContext into an application scoped object -
in this example it's called MyVisit. Then in your superclass of all
pages that require authorisation, do this...
/**
* pageValidate - ensure the user is logged in.
*/
public void pageValidate(PageEvent event) {
Visit visit = getMyVisit();
// If you're not logged in, then we go to the login page.
if (visit == null || !visit.isLoggedIn()) {
redirectToLoginPage();
}
// Is this too expensive to have here, or should it be
called on demand?
reEstablishLogin();
}
protected void reEstablishLogin() {
// re-establish my JAAS login
try {
getMyVisit().getLoginContext().login();
} catch (LoginException e) {
redirectToLoginPage();
}
}
private void redirectToLoginPage() {
LoginPage login = (LoginPage) getRequestCycle().getPage
("pages/login/LoginPage");
login.setCallback(new PageCallback(this));
throw new PageRedirectException(login);
}
Any JAAS aficionados out there?
HTH,
Geoff
On 22/05/2007, at 7:00 PM, Jan Vissers wrote:
> Hi,
>
> How would one incorporate JAAS into Tapestry 4+.
> We already have a login module, but need help to tie it in to the
> framework.
>
> Thanks,
> -J.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>