You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Gernot Stocker <ge...@tugraz.at> on 2006/01/18 14:47:32 UTC

ACEGI Security and Tapestry...

Hi everybody,
I'm trying to implement a tapestry application with the ACEGI-FilterChainProxy, 
Tapestry 4.0, Spring, Hibernate software stack. The ACEGI part of authentication 
is already working with a tapestry login page which sends the request to the 
typical j_acegi_security_check url. There the ACEGI- AuthenticationProcessingFilter
does the authentication and on success it redirects to the tapestry HOME page. 

What I would like to do now, is to access from a customized ACEGI- 
AuthenticationProcessingFilter the tapestry (hivemind) context in order to initialize 
a user ASO with appropriate user data, retrieved during login filtering. 

What is the cleanest way to create/access the tapestry ASO from such a servlet 
filter? 

Thanks for your help,
Gernot
-- 
Gernot Stocker,
Institute for Genomics and Bioinformatics(IGB)
Petersgasse 14, 8010 Graz, Austria
Tel.: ++43 316 873 5345
http://genome.tugraz.at

Re: ACEGI Security and Tapestry...

Posted by soir <ig...@gmail.com>.
I create ASO from my implementation of Acegi AuthenticationProcessingFilter
in such way:

protected void onSuccessfulAuthentication(HttpServletRequest request,
        HttpServletResponse response, Authentication authResult)
        throws IOException {
super.onSuccessfulAuthentication(request, response, authResult);

// create User object
...

// create Tapesty ASO

// get ASO from the session ("shop" is name of the application, and
"sessionData" is name of ASO)
SessionData sessionData = (SessionData)
request.getSession().getAttribute("state:shop:sessionData");

// create ASO if need and store into the session
if (sessionData == null) {
  sessionData = new SessionData();            
  request.getSession().setAttribute("state:shop:sessionData", sessionData);
}
            
// update ASO
sessionData.setUser(user);
}


Gernot Stocker wrote:
> 
> Hi,
> I don't want to switch complete project structure because I'm using 
> AndroMDA and the MDA approach to modell the businesstier. This is 
> almost done and I just have to find the connex between ACEGI 
> security filter and the tapestry application context.
> 
> Is there no helper class ("magic" method call) which can be used to 
> create/access an ASO having the HttpServletRequest as a 
> parameter? Does it work with the ApplicationStateManager Service?
> 
> Thanks for any help,
> Gernot
> 
> On Wednesday 18 January 2006 16:42, Raul Raja Martinez wrote:
>> Even though it does not answer your question you might want to take a 
>> look at the current Trails CVS, it uses Tapestry 4, Hibernate, Spring 
>> and I believe Acegi as well, I'm an currently using the Trails engine 
>> both with Trails applications that use TrailsPage and with regular 
>> Tapestry apps to get an out of the box environment with Spring and 
>> hibernate ready to go.
>> 
>> best regards.
> 
> -- 
> Gernot Stocker,
> Institute for Genomics and Bioinformatics(IGB)
> Petersgasse 14, 8010 Graz, Austria
> Tel.: ++43 316 873 5345
> http://genome.tugraz.at
> 
> 

-- 
View this message in context: http://www.nabble.com/ACEGI-Security-and-Tapestry...-tf944507.html#a6358740
Sent from the Tapestry - User forum at Nabble.com.


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


Re: ACEGI Security and Tapestry...

Posted by Gernot Stocker <ge...@tugraz.at>.
Hi,
I don't want to switch complete project structure because I'm using 
AndroMDA and the MDA approach to modell the businesstier. This is 
almost done and I just have to find the connex between ACEGI 
security filter and the tapestry application context.

Is there no helper class ("magic" method call) which can be used to 
create/access an ASO having the HttpServletRequest as a 
parameter? Does it work with the ApplicationStateManager Service?

Thanks for any help,
Gernot

On Wednesday 18 January 2006 16:42, Raul Raja Martinez wrote:
> Even though it does not answer your question you might want to take a 
> look at the current Trails CVS, it uses Tapestry 4, Hibernate, Spring 
> and I believe Acegi as well, I'm an currently using the Trails engine 
> both with Trails applications that use TrailsPage and with regular 
> Tapestry apps to get an out of the box environment with Spring and 
> hibernate ready to go.
> 
> best regards.

-- 
Gernot Stocker,
Institute for Genomics and Bioinformatics(IGB)
Petersgasse 14, 8010 Graz, Austria
Tel.: ++43 316 873 5345
http://genome.tugraz.at

Re: ACEGI Security and Tapestry...

Posted by Raul Raja Martinez <do...@estudiowebs.com>.
Even though it does not answer your question you might want to take a 
look at the current Trails CVS, it uses Tapestry 4, Hibernate, Spring 
and I believe Acegi as well, I'm an currently using the Trails engine 
both with Trails applications that use TrailsPage and with regular 
Tapestry apps to get an out of the box environment with Spring and 
hibernate ready to go.

best regards.

Raul Raja.

Gernot Stocker wrote:
> Hi everybody,
> I'm trying to implement a tapestry application with the ACEGI-FilterChainProxy, 
> Tapestry 4.0, Spring, Hibernate software stack. The ACEGI part of authentication 
> is already working with a tapestry login page which sends the request to the 
> typical j_acegi_security_check url. There the ACEGI- AuthenticationProcessingFilter
> does the authentication and on success it redirects to the tapestry HOME page. 
> 
> What I would like to do now, is to access from a customized ACEGI- 
> AuthenticationProcessingFilter the tapestry (hivemind) context in order to initialize 
> a user ASO with appropriate user data, retrieved during login filtering. 
> 
> What is the cleanest way to create/access the tapestry ASO from such a servlet 
> filter? 
> 
> Thanks for your help,
> Gernot


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org