You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Srinivas Yermal <sy...@indygosoft.com> on 2007/01/17 07:00:54 UTC

Acegi and Visit object

Hi,

I have been trying to initialize the Visit object with certain values once
the user has logged in. The values needless to say are user specific. So I
would need to access the auth details from acegi. What should I be doing to
set these values? I am bit lost here. We are using Acegi with spring and
tapestry 4.0.2.

I found examples from the tapestry 3.x in the archives but nothing pointing
me to how to do it with the latest bundles. If there is already some
discussion on this, I would be really grateful if you could point me in that
direction.

Thanks,
Srini.

Re: Acegi and Visit object

Posted by Srinivas Yermal <sy...@indygosoft.com>.
Hi Andreas and James,

Please correct me if I am wrong. I am trying to understand what needs to be
done. The UserDetailsService is something where the user is returned back
given a userid. So we need to inject the visit object into the
UserDetailsService? and then set it. I agree that the user might not be able
to successfully login due to a bad password. So is there any other method
say something like yet another service that can be invoked in the chain on
successful login or something of such sort.

Or is it something like tapestry-acegi has a hook which I can use to do
this?

Thanks,
Srini.

On 1/19/07, James Carman <ja...@carmanconsulting.com> wrote:
>
> This is the main reason that I wrote Tapestry-Acegi, so that you get
> the best of both worlds.  You can get at all the good Tapestry
> framework stuff and have the Acegi stuff too.
>
>
> On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
> > Actually, I'm not sure that the UserDetailsService is the best option
> > for setting up visit,
> > (cause the user may not eventually have the correct password) but
> anyway,
> > here's how it can be done using hivemind and tapestry-acegi:
> >
> > <implementation service-id="hivemind.acegi.dao.UserDetailsService">
> >
> >         <invoke-factory service-id="hivemind.BuilderFactory"
> > model="singleton">
> >            <construct class="my.custom.UserDetailsService">
> >                <set-service property="userDao" service-id="..."/>
> >                <set-service property="stateManager"
> > service-id="tapestry.state.ApplicationStateManager"/>
> >            </construct>
> >         </invoke-factory>
> >     </implementation>
> >
> > and also take a look at
> >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html
> >
> >
> >
> > Srinivas Yermal wrote:
> > > Hi Andreas,
> > >
> > > Thanks for the response. Does tapestry-acegi automagically fill-in the
> > > user
> > > details into the visit object? Or should I do something?
> > >
> > > I use spring for my acegi declarations and specify my
> > > UserDetailsService in
> > > the DaoAuthenticationProvider.  You mention ASO. How would I go about
> > > doing
> > > it through state objects?
> > >
> > > Regards,
> > > Srini.
> > >
> > > On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
> > >>
> > >> i've been using tapestry-acegi, so perhaps this might not be helpful
> in
> > >> your case...
> > >>
> > >> so, how are you declaring the UserDetailsService implementation to be
> > >> used by acegi ?
> > >>
> > >> If you could inject into hivemind's ApplicationStateManager you would
> be
> > >> able to
> > >> access any ASO you'd like.
> > >>
> > >>
> > >
> >
> >
> > --
> > Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> > Tapestry / Tacos developer
> > Open Source / J2EE Consulting
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
http://www.indygosoft.com

Re: Acegi and Visit object

Posted by James Carman <ja...@carmanconsulting.com>.
The HiveDocs are online, now.  Please refer to

http://www.carmanconsulting.com/tapestry-acegi

Wow!  That hivedoc plugin is really cool!  We do need to get that
incorporated as a subproject of the HiveMind project itself.  Nice
work!  Very easy to use.



On 1/19/07, jake123 <ja...@gmail.com> wrote:
>
>
>
> andyhot wrote:
> >
> > James Carman wrote:
> >> This is the main reason that I wrote Tapestry-Acegi, so that you get
> >> the best of both worlds.  You can get at all the good Tapestry
> >> framework stuff and have the Acegi stuff too.
> >
> > James, it was useful for me to have the hivedocs for the tapestry.acegi
> > and
> > the hivemind.acegi modules... I did got them generated using Marcus new
> > hivedoc-plugin and now have them all (manually) combined in one xdoc.
> > D'you want them
> > emailed so you can include them at
> > http://www.carmanconsulting.com/tapestry-acegi ?
> >
> >
>
> Could you possible email me a copy of the documentation that you talking
> about. That would help me a lot...
>
> Thanks
> Jacob
> --
> View this message in context: http://www.nabble.com/Acegi-and-Visit-object-tf3025484.html#a8453882
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: Acegi and Visit object

Posted by jake123 <ja...@gmail.com>.


andyhot wrote:
> 
> James Carman wrote:
>> This is the main reason that I wrote Tapestry-Acegi, so that you get
>> the best of both worlds.  You can get at all the good Tapestry
>> framework stuff and have the Acegi stuff too.
> 
> James, it was useful for me to have the hivedocs for the tapestry.acegi
> and
> the hivemind.acegi modules... I did got them generated using Marcus new
> hivedoc-plugin and now have them all (manually) combined in one xdoc. 
> D'you want them
> emailed so you can include them at 
> http://www.carmanconsulting.com/tapestry-acegi ?
> 
> 

Could you possible email me a copy of the documentation that you talking
about. That would help me a lot...

Thanks
Jacob
-- 
View this message in context: http://www.nabble.com/Acegi-and-Visit-object-tf3025484.html#a8453882
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Acegi and Visit object

Posted by andyhot <an...@di.uoa.gr>.
James Carman wrote:
> Sure, send it along.  Actually, if the plugin is available via some
> maven repo, then I can just include it in my maven build and have it
> in there as one of the reports.

just add

            <plugin>
                    <groupId>ch.marcus-schulte.maven</groupId>
                    <artifactId>hivedoc-plugin</artifactId>
                    <version>1.0.1</version>   
            <configuration>
            <extraResources>
                
<extraResource>custom/hivemind/folder/if/needed</extraResource>        
       
            </extraResources>
            </configuration>

in your <reporting>

the plugin is in the central repo, no need to do anything else...


AFAIK, it currently doesn't handle submodules,
i just had it run twice (for tapestry.acegi and hivemind.acegi) and 
concatenated the output.




>
> On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
>> James Carman wrote:
>> > This is the main reason that I wrote Tapestry-Acegi, so that you get
>> > the best of both worlds.  You can get at all the good Tapestry
>> > framework stuff and have the Acegi stuff too.
>>
>> James, it was useful for me to have the hivedocs for the 
>> tapestry.acegi and
>> the hivemind.acegi modules... I did got them generated using Marcus new
>> hivedoc-plugin and now have them all (manually) combined in one xdoc.
>> D'you want them
>> emailed so you can include them at
>> http://www.carmanconsulting.com/tapestry-acegi ?
>>
>> >
>> >
>> > On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
>> >> Actually, I'm not sure that the UserDetailsService is the best option
>> >> for setting up visit,
>> >> (cause the user may not eventually have the correct password) but
>> >> anyway,
>> >> here's how it can be done using hivemind and tapestry-acegi:
>> >>
>> >> <implementation service-id="hivemind.acegi.dao.UserDetailsService">
>> >>
>> >>         <invoke-factory service-id="hivemind.BuilderFactory"
>> >> model="singleton">
>> >>            <construct class="my.custom.UserDetailsService">
>> >>                <set-service property="userDao" service-id="..."/>
>> >>                <set-service property="stateManager"
>> >> service-id="tapestry.state.ApplicationStateManager"/>
>> >>            </construct>
>> >>         </invoke-factory>
>> >>     </implementation>
>> >>
>> >> and also take a look at
>> >> 
>> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html 
>>
>> >>
>> >>
>> >>
>> >>
>> >> Srinivas Yermal wrote:
>> >> > Hi Andreas,
>> >> >
>> >> > Thanks for the response. Does tapestry-acegi automagically 
>> fill-in the
>> >> > user
>> >> > details into the visit object? Or should I do something?
>> >> >
>> >> > I use spring for my acegi declarations and specify my
>> >> > UserDetailsService in
>> >> > the DaoAuthenticationProvider.  You mention ASO. How would I go 
>> about
>> >> > doing
>> >> > it through state objects?
>> >> >
>> >> > Regards,
>> >> > Srini.
>> >> >
>> >> > On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
>> >> >>
>> >> >> i've been using tapestry-acegi, so perhaps this might not be
>> >> helpful in
>> >> >> your case...
>> >> >>
>> >> >> so, how are you declaring the UserDetailsService implementation 
>> to be
>> >> >> used by acegi ?
>> >> >>
>> >> >> If you could inject into hivemind's ApplicationStateManager you
>> >> would be
>> >> >> able to
>> >> >> access any ASO you'd like.
>> >> >>
>> >> >>
>> >> >
>> >>
>> >>
>> >> --
>> >> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
>> >> Tapestry / Tacos developer
>> >> Open Source / J2EE Consulting
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>> >
>>
>>
>> -- 
>> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
>> Tapestry / Tacos developer
>> Open Source / J2EE Consulting
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


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


Re: Acegi and Visit object

Posted by James Carman <ja...@carmanconsulting.com>.
Sure, send it along.  Actually, if the plugin is available via some
maven repo, then I can just include it in my maven build and have it
in there as one of the reports.

On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
> James Carman wrote:
> > This is the main reason that I wrote Tapestry-Acegi, so that you get
> > the best of both worlds.  You can get at all the good Tapestry
> > framework stuff and have the Acegi stuff too.
>
> James, it was useful for me to have the hivedocs for the tapestry.acegi and
> the hivemind.acegi modules... I did got them generated using Marcus new
> hivedoc-plugin and now have them all (manually) combined in one xdoc.
> D'you want them
> emailed so you can include them at
> http://www.carmanconsulting.com/tapestry-acegi ?
>
> >
> >
> > On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
> >> Actually, I'm not sure that the UserDetailsService is the best option
> >> for setting up visit,
> >> (cause the user may not eventually have the correct password) but
> >> anyway,
> >> here's how it can be done using hivemind and tapestry-acegi:
> >>
> >> <implementation service-id="hivemind.acegi.dao.UserDetailsService">
> >>
> >>         <invoke-factory service-id="hivemind.BuilderFactory"
> >> model="singleton">
> >>            <construct class="my.custom.UserDetailsService">
> >>                <set-service property="userDao" service-id="..."/>
> >>                <set-service property="stateManager"
> >> service-id="tapestry.state.ApplicationStateManager"/>
> >>            </construct>
> >>         </invoke-factory>
> >>     </implementation>
> >>
> >> and also take a look at
> >> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html
> >>
> >>
> >>
> >>
> >> Srinivas Yermal wrote:
> >> > Hi Andreas,
> >> >
> >> > Thanks for the response. Does tapestry-acegi automagically fill-in the
> >> > user
> >> > details into the visit object? Or should I do something?
> >> >
> >> > I use spring for my acegi declarations and specify my
> >> > UserDetailsService in
> >> > the DaoAuthenticationProvider.  You mention ASO. How would I go about
> >> > doing
> >> > it through state objects?
> >> >
> >> > Regards,
> >> > Srini.
> >> >
> >> > On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
> >> >>
> >> >> i've been using tapestry-acegi, so perhaps this might not be
> >> helpful in
> >> >> your case...
> >> >>
> >> >> so, how are you declaring the UserDetailsService implementation to be
> >> >> used by acegi ?
> >> >>
> >> >> If you could inject into hivemind's ApplicationStateManager you
> >> would be
> >> >> able to
> >> >> access any ASO you'd like.
> >> >>
> >> >>
> >> >
> >>
> >>
> >> --
> >> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> >> Tapestry / Tacos developer
> >> Open Source / J2EE Consulting
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: Acegi and Visit object

Posted by andyhot <an...@di.uoa.gr>.
James Carman wrote:
> This is the main reason that I wrote Tapestry-Acegi, so that you get
> the best of both worlds.  You can get at all the good Tapestry
> framework stuff and have the Acegi stuff too.

James, it was useful for me to have the hivedocs for the tapestry.acegi and
the hivemind.acegi modules... I did got them generated using Marcus new
hivedoc-plugin and now have them all (manually) combined in one xdoc. 
D'you want them
emailed so you can include them at 
http://www.carmanconsulting.com/tapestry-acegi ?

>
>
> On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
>> Actually, I'm not sure that the UserDetailsService is the best option
>> for setting up visit,
>> (cause the user may not eventually have the correct password) but 
>> anyway,
>> here's how it can be done using hivemind and tapestry-acegi:
>>
>> <implementation service-id="hivemind.acegi.dao.UserDetailsService">
>>
>>         <invoke-factory service-id="hivemind.BuilderFactory"
>> model="singleton">
>>            <construct class="my.custom.UserDetailsService">
>>                <set-service property="userDao" service-id="..."/>
>>                <set-service property="stateManager"
>> service-id="tapestry.state.ApplicationStateManager"/>
>>            </construct>
>>         </invoke-factory>
>>     </implementation>
>>
>> and also take a look at
>> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html 
>>
>>
>>
>>
>> Srinivas Yermal wrote:
>> > Hi Andreas,
>> >
>> > Thanks for the response. Does tapestry-acegi automagically fill-in the
>> > user
>> > details into the visit object? Or should I do something?
>> >
>> > I use spring for my acegi declarations and specify my
>> > UserDetailsService in
>> > the DaoAuthenticationProvider.  You mention ASO. How would I go about
>> > doing
>> > it through state objects?
>> >
>> > Regards,
>> > Srini.
>> >
>> > On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
>> >>
>> >> i've been using tapestry-acegi, so perhaps this might not be 
>> helpful in
>> >> your case...
>> >>
>> >> so, how are you declaring the UserDetailsService implementation to be
>> >> used by acegi ?
>> >>
>> >> If you could inject into hivemind's ApplicationStateManager you 
>> would be
>> >> able to
>> >> access any ASO you'd like.
>> >>
>> >>
>> >
>>
>>
>> -- 
>> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
>> Tapestry / Tacos developer
>> Open Source / J2EE Consulting
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


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


Re: Acegi and Visit object

Posted by Robin Ericsson <lo...@gmail.com>.
On 1/22/07, andyhot <an...@di.uoa.gr> wrote:
> jake123 wrote:
> > Hi James,
> > You have to excuse me but I am on my first time on integrating tapestry and
> > acegi. So I might have some question that is obvious for others...
> >
>
> again, simply follow http://wiki.apache.org/tapestry/AcegiSpringJava5

This can also be done with hivemind.xml and not applicationContext.xml
from Spring if you are not using Spring for anything else. See a few
of my previous posts regarding Acegi.

-- 
        regards,
        Robin

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


Re: Acegi and Visit object

Posted by andyhot <an...@di.uoa.gr>.
jake123 wrote:
> Hi James,
> You have to excuse me but I am on my first time on integrating tapestry and
> acegi. So I might have some question that is obvious for others...
>   

again, simply follow http://wiki.apache.org/tapestry/AcegiSpringJava5

Then create your own implementation of
org.acegisecurity.userdetails.UserDetailsService
and use that instead of the memoryAuthenticationDao bean ( which is an 
InMemoryDaoImpl )

Check out the acegi docs for what should happen inside a UserDetailsService


> 1) how do I configure my web.xml?
> 2) how do I configure my hivemodule.xml?
> 3) how do I configure my hivemind-acegi?
> 4) how do I configure my hivemind-acegi-dao?
> 5) do I need to configure something else?
>
> I really want to use the cool part with Acegi's @Secured annotation but I
> cant get there without some pointers....
> Cheers,
> Jacob
>   


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


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


Re: Acegi and Visit object

Posted by jake123 <ja...@gmail.com>.

James Carman wrote:
> 
> Basically, tapestry-acegi just allows you to glue all of the Acegi
> stuff together using HiveMind, rather than Spring (it's all just
> "object soup" right?).  Actually, the majority of the configuration of
> the services goes on outside of tapestry-acegi itself (it's in
> hivemind-acegi and hivemind-acegi-dao, so it can be used in a
> generalized fashion).  The cool part of tapestry-acegi is that it lets
> you use Acegi's @Secured annotation (found in the acegi-tiger jar
> file) to annotate your listener methods and page classes so that you
> can declaratively secure them to specific roles.  As for examples, I
> don't really have one, but somebody wrote a nice Wiki page detailing
> how to set it up.
> 

Hi James,
You have to excuse me but I am on my first time on integrating tapestry and
acegi. So I might have some question that is obvious for others...
1) how do I configure my web.xml?
2) how do I configure my hivemodule.xml?
3) how do I configure my hivemind-acegi?
4) how do I configure my hivemind-acegi-dao?
5) do I need to configure something else?

I really want to use the cool part with Acegi's @Secured annotation but I
cant get there without some pointers....
Cheers,
Jacob
-- 
View this message in context: http://www.nabble.com/Acegi-and-Visit-object-tf3025484.html#a8504216
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Acegi and Visit object

Posted by James Carman <ja...@carmanconsulting.com>.
By the way, you don't *have* to implement your UserDetailsService
inside a Spring container.  You can do so, but you lose the easy
ability to have other HiveMind services automatically injected into
your implementation instance.  Since you're just implementing an
interface, I really see no need to have it as a Spring bean (I don't
use the Spring container at all in my applications, though, so I am
biased I guess).  To do it using HiveMind, you'd use the
BuilderFactory (the default) to build your implementation object
rather than the SpringLookupFactory.

On 1/22/07, Jesper Zedlitz <jz...@freenet.de> wrote:
> Thiago H de Paula Figueiredo wrote:
> > What do I do if I want to use tapestry-acegi leaving the acegi
> > configuration in spring instead of HiveMind?
> >
> You have your own org.acegisecurity.userdetails.UserDetailsService and want
> to use it with tapestry-acegi? No problem!
>
> Here is an example how to do it. First we need a Spring bean for that
> UserDetailsService (in your applicationContext.xml)
>  <bean id="userDbAuthenticationDao"
>        class="jesper.UserDetailsServiceImpl"
>        name="authenticationDao">
>     <!-- whatever your implementation needs -->
>  </bean>
> (That replaced the "memoryAuthenticationDao" from my example.)
>
> We reference this bean in hivemodule.xml
>   <implementation service-id="hivemind.acegi.dao.UserDetailsService">
>     <invoke-factory service-id="hivemind.lib.SpringLookupFactory">
>        <lookup-bean name="authenticationDao" />
>     </invoke-factory>
>   </implementation>
>
> Jesper
>
> --
>  Jesper Zedlitz   E-Mail   : jesper@zedlitz.de
>                   Homepage : http://www.zedlitz.de
>                   ICQ#     : 23890711
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: Acegi and Visit object

Posted by Jesper Zedlitz <jz...@freenet.de>.
Thiago H de Paula Figueiredo wrote:
> What do I do if I want to use tapestry-acegi leaving the acegi
> configuration in spring instead of HiveMind?
>
You have your own org.acegisecurity.userdetails.UserDetailsService and want
to use it with tapestry-acegi? No problem! 

Here is an example how to do it. First we need a Spring bean for that
UserDetailsService (in your applicationContext.xml)
 <bean id="userDbAuthenticationDao" 
       class="jesper.UserDetailsServiceImpl"
       name="authenticationDao">
    <!-- whatever your implementation needs -->
 </bean>
(That replaced the "memoryAuthenticationDao" from my example.)

We reference this bean in hivemodule.xml
  <implementation service-id="hivemind.acegi.dao.UserDetailsService">
    <invoke-factory service-id="hivemind.lib.SpringLookupFactory">
       <lookup-bean name="authenticationDao" />
    </invoke-factory>
  </implementation>

Jesper

-- 
 Jesper Zedlitz   E-Mail   : jesper@zedlitz.de
                  Homepage : http://www.zedlitz.de
                  ICQ#     : 23890711


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


Re: Acegi and Visit object

Posted by Thiago H de Paula Figueiredo <th...@terra.com.br>.
On Fri, 19 Jan 2007 15:09:58 -0200, James Carman  
<ja...@carmanconsulting.com> wrote:

> Basically, tapestry-acegi just allows you to glue all of the Acegi
> stuff together using HiveMind, rather than Spring (it's all just
> "object soup" right?).
[snip]
> The cool part of tapestry-acegi is that it lets
> you use Acegi's @Secured annotation (found in the acegi-tiger jar

What do I do if I want to use tapestry-acegi leaving the acegi  
configuration in spring instead of HiveMind?
I tried to use tapestry-acegi, but its lack of complete documentation on  
how to properly configure it (including hivemind-acegi-dao) and my lack of  
time prevented me of doing it successfully. :(

-- 

hasta la vista!!!

|8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p

thiago h. de paula figueiredo
mestre em ciência da computação pelo dcc/ufmg
ate' porque bobagem pouca e' bobagem . . .

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


Re: Acegi and Visit object

Posted by Robin Ericsson <lo...@gmail.com>.
On 1/22/07, Jesper Zedlitz <je...@zedlitz.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jesper Zedlitz wrote:
> > I am still working on a solution for form based login.
> >
> Here is my first attempt for a form based login:
> http://wiki.apache.org/tapestry/AcegiSpringJava5FormBased
>
> I am sure you have some ideas how to improve it. It has only been tested
> with GET requests, yet.

I've have a working form based login (also see previous threads). I've
sent them to James for inclusion in tapestry-acegi, but I guess he is
svamped at the moment.

-- 
        regards,
        Robin

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


Re: Acegi and Visit object

Posted by Jesper Zedlitz <je...@zedlitz.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jesper Zedlitz wrote:
> I am still working on a solution for form based login.
>
Here is my first attempt for a form based login:
http://wiki.apache.org/tapestry/AcegiSpringJava5FormBased

I am sure you have some ideas how to improve it. It has only been tested
with GET requests, yet.

Jesper

- -- 
 Jesper Zedlitz   E-Mail   : jesper@zedlitz.de      
                  Homepage : http://www.zedlitz.de  
                  ICQ#     : 23890711               
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFtSz6jSxW58yLxdgRAk8KAKCUjg3x+Z9q4saUrH3cC212iyGC7gCdFyvE
c2nwzKB+ihqetRJPcwmQVZM=
=ppfy
-----END PGP SIGNATURE-----


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


Re: Acegi and Visit object

Posted by Shing Hing Man <ma...@yahoo.com>.
Just in case you have not come across it and might be
useful to you, the following is an example of using a
Tapestry 
page as a form login page in Acegi.

http://wiki.javascud.org/display/hsa/Acegi+and+Tapestry--A+Step-by-Step+Guide


Shing



--- Jesper Zedlitz <jz...@freenet.de> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> James Carman wrote:
> > As for examples, I
> > don't really have one, but somebody wrote a nice
> Wiki page detailing
> > how to set it up.
> > 
> http://wiki.apache.org/tapestry/AcegiSpringJava5
> 
> I am still working on a solution for form based
> login. Maybe the login form
> could be a normal Tapestry page that puts the login
> data into Acegi's
> SecurityContextHolder. We discussed that approach
> here on the group some
> time ago but there is no useable code, yet.
> 
> Jesper
> 
> - -- 
>  Jesper Zedlitz   E-Mail   : jesper@zedlitz.de
>                   Homepage : http://www.zedlitz.de
>                   ICQ#     : 23890711
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> 
>
iD8DBQFFtGrXjSxW58yLxdgRAtP0AJ4vMzTnq6Rp22XSVD8EKhXyuPET5QCgodx9
> Qoke/pRlQr8CffQP1xFJ2p4=
> =r0Jy
> -----END PGP SIGNATURE-----
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 

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


Re: Acegi and Visit object

Posted by Jesper Zedlitz <jz...@freenet.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James Carman wrote:
> As for examples, I
> don't really have one, but somebody wrote a nice Wiki page detailing
> how to set it up.
> 
http://wiki.apache.org/tapestry/AcegiSpringJava5

I am still working on a solution for form based login. Maybe the login form
could be a normal Tapestry page that puts the login data into Acegi's
SecurityContextHolder. We discussed that approach here on the group some
time ago but there is no useable code, yet.

Jesper

- -- 
 Jesper Zedlitz   E-Mail   : jesper@zedlitz.de
                  Homepage : http://www.zedlitz.de
                  ICQ#     : 23890711
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFtGrXjSxW58yLxdgRAtP0AJ4vMzTnq6Rp22XSVD8EKhXyuPET5QCgodx9
Qoke/pRlQr8CffQP1xFJ2p4=
=r0Jy
-----END PGP SIGNATURE-----


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


Re: Acegi and Visit object

Posted by James Carman <ja...@carmanconsulting.com>.
Basically, tapestry-acegi just allows you to glue all of the Acegi
stuff together using HiveMind, rather than Spring (it's all just
"object soup" right?).  Actually, the majority of the configuration of
the services goes on outside of tapestry-acegi itself (it's in
hivemind-acegi and hivemind-acegi-dao, so it can be used in a
generalized fashion).  The cool part of tapestry-acegi is that it lets
you use Acegi's @Secured annotation (found in the acegi-tiger jar
file) to annotate your listener methods and page classes so that you
can declaratively secure them to specific roles.  As for examples, I
don't really have one, but somebody wrote a nice Wiki page detailing
how to set it up.


On 1/19/07, jake123 <ja...@gmail.com> wrote:
>
>
>
> James Carman wrote:
> >
> > This is the main reason that I wrote Tapestry-Acegi, so that you get
> > the best of both worlds.  You can get at all the good Tapestry
> > framework stuff and have the Acegi stuff too.
> >
>
> Hi James,
> We are about to implement Acegi to our application and we are using Spring
> 2.0.2, Hibernate 3, Tapestry 4.02.
> Are tapestry-acegi.jar a replacement for doing the Acegi mappings in Spring?
> What do we need to configure to make it work? If you could give some example
> that would bee really nice
>
> Thanks a lot
>
> Jacob
> --
> View this message in context: http://www.nabble.com/Acegi-and-Visit-object-tf3025484.html#a8449953
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: Acegi and Visit object

Posted by jake123 <ja...@gmail.com>.


James Carman wrote:
> 
> This is the main reason that I wrote Tapestry-Acegi, so that you get
> the best of both worlds.  You can get at all the good Tapestry
> framework stuff and have the Acegi stuff too.
> 

Hi James,
We are about to implement Acegi to our application and we are using Spring
2.0.2, Hibernate 3, Tapestry 4.02.
Are tapestry-acegi.jar a replacement for doing the Acegi mappings in Spring?
What do we need to configure to make it work? If you could give some example
that would bee really nice

Thanks a lot

Jacob
-- 
View this message in context: http://www.nabble.com/Acegi-and-Visit-object-tf3025484.html#a8449953
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Acegi and Visit object

Posted by James Carman <ja...@carmanconsulting.com>.
This is the main reason that I wrote Tapestry-Acegi, so that you get
the best of both worlds.  You can get at all the good Tapestry
framework stuff and have the Acegi stuff too.


On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
> Actually, I'm not sure that the UserDetailsService is the best option
> for setting up visit,
> (cause the user may not eventually have the correct password) but anyway,
> here's how it can be done using hivemind and tapestry-acegi:
>
> <implementation service-id="hivemind.acegi.dao.UserDetailsService">
>
>         <invoke-factory service-id="hivemind.BuilderFactory"
> model="singleton">
>            <construct class="my.custom.UserDetailsService">
>                <set-service property="userDao" service-id="..."/>
>                <set-service property="stateManager"
> service-id="tapestry.state.ApplicationStateManager"/>
>            </construct>
>         </invoke-factory>
>     </implementation>
>
> and also take a look at
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html
>
>
>
> Srinivas Yermal wrote:
> > Hi Andreas,
> >
> > Thanks for the response. Does tapestry-acegi automagically fill-in the
> > user
> > details into the visit object? Or should I do something?
> >
> > I use spring for my acegi declarations and specify my
> > UserDetailsService in
> > the DaoAuthenticationProvider.  You mention ASO. How would I go about
> > doing
> > it through state objects?
> >
> > Regards,
> > Srini.
> >
> > On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
> >>
> >> i've been using tapestry-acegi, so perhaps this might not be helpful in
> >> your case...
> >>
> >> so, how are you declaring the UserDetailsService implementation to be
> >> used by acegi ?
> >>
> >> If you could inject into hivemind's ApplicationStateManager you would be
> >> able to
> >> access any ASO you'd like.
> >>
> >>
> >
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: Acegi and Visit object

Posted by andyhot <an...@di.uoa.gr>.
Actually, I'm not sure that the UserDetailsService is the best option 
for setting up visit,
(cause the user may not eventually have the correct password) but anyway,
here's how it can be done using hivemind and tapestry-acegi:

<implementation service-id="hivemind.acegi.dao.UserDetailsService">

        <invoke-factory service-id="hivemind.BuilderFactory" 
model="singleton">
           <construct class="my.custom.UserDetailsService">
               <set-service property="userDao" service-id="..."/>
               <set-service property="stateManager" 
service-id="tapestry.state.ApplicationStateManager"/>
           </construct>
        </invoke-factory>
    </implementation>

and also take a look at
http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html



Srinivas Yermal wrote:
> Hi Andreas,
>
> Thanks for the response. Does tapestry-acegi automagically fill-in the 
> user
> details into the visit object? Or should I do something?
>
> I use spring for my acegi declarations and specify my 
> UserDetailsService in
> the DaoAuthenticationProvider.  You mention ASO. How would I go about 
> doing
> it through state objects?
>
> Regards,
> Srini.
>
> On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
>>
>> i've been using tapestry-acegi, so perhaps this might not be helpful in
>> your case...
>>
>> so, how are you declaring the UserDetailsService implementation to be
>> used by acegi ?
>>
>> If you could inject into hivemind's ApplicationStateManager you would be
>> able to
>> access any ASO you'd like.
>>
>>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


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


Re: Acegi and Visit object

Posted by Srinivas Yermal <sy...@indygosoft.com>.
Hi Andreas,

Thanks for the response. Does tapestry-acegi automagically fill-in the user
details into the visit object? Or should I do something?

I use spring for my acegi declarations and specify my UserDetailsService in
the DaoAuthenticationProvider.  You mention ASO. How would I go about doing
it through state objects?

Regards,
Srini.

On 1/19/07, andyhot <an...@di.uoa.gr> wrote:
>
> i've been using tapestry-acegi, so perhaps this might not be helpful in
> your case...
>
> so, how are you declaring the UserDetailsService implementation to be
> used by acegi ?
>
> If you could inject into hivemind's ApplicationStateManager you would be
> able to
> access any ASO you'd like.
>
>

Re: Acegi and Visit object

Posted by andyhot <an...@di.uoa.gr>.
i've been using tapestry-acegi, so perhaps this might not be helpful in 
your case...

so, how are you declaring the UserDetailsService implementation to be 
used by acegi ?

If you could inject into hivemind's ApplicationStateManager you would be 
able to
access any ASO you'd like.


Srinivas Yermal wrote:
> The one option that I keep seeing in the archives is reading in the user
> details through either the request.getRemoteUser() or 
> SecurityContextHolder.
> I am ok with either of them. The only issue however is where to put this
> initialization code?
>
> Should this code be a part of the base page like say "BaseSecurePage 
> extends
> BasePage" and all others extend BaseSecurePage? Or is there any 
> cleaner and
> tapestry-like way that I should be following? say inject it in some 
> place or
> some filter that I should be writing or the like.
>
> Gurus of tapestry! need help.
> Thanks
> Srini.
>
> On 1/17/07, Srinivas Yermal <sy...@indygosoft.com> wrote:
>>
>> Hi,
>>
>> I have been trying to initialize the Visit object with certain values 
>> once
>> the user has logged in. The values needless to say are user specific. 
>> So I
>> would need to access the auth details from acegi. What should I be 
>> doing to
>> set these values? I am bit lost here. We are using Acegi with spring and
>> tapestry 4.0.2.
>>
>> I found examples from the tapestry 3.x in the archives but nothing
>> pointing me to how to do it with the latest bundles. If there is already
>> some discussion on this, I would be really grateful if you could 
>> point me in
>> that direction.
>>
>> Thanks,
>> Srini.
>>
>>
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


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


Re: Acegi and Visit object

Posted by Srinivas Yermal <sy...@indygosoft.com>.
The one option that I keep seeing in the archives is reading in the user
details through either the request.getRemoteUser() or SecurityContextHolder.
I am ok with either of them. The only issue however is where to put this
initialization code?

Should this code be a part of the base page like say "BaseSecurePage extends
BasePage" and all others extend BaseSecurePage? Or is there any cleaner and
tapestry-like way that I should be following? say inject it in some place or
some filter that I should be writing or the like.

Gurus of tapestry! need help.
Thanks
Srini.

On 1/17/07, Srinivas Yermal <sy...@indygosoft.com> wrote:
>
> Hi,
>
> I have been trying to initialize the Visit object with certain values once
> the user has logged in. The values needless to say are user specific. So I
> would need to access the auth details from acegi. What should I be doing to
> set these values? I am bit lost here. We are using Acegi with spring and
> tapestry 4.0.2.
>
> I found examples from the tapestry 3.x in the archives but nothing
> pointing me to how to do it with the latest bundles. If there is already
> some discussion on this, I would be really grateful if you could point me in
> that direction.
>
> Thanks,
> Srini.
>
>


-- 
http://www.indygosoft.com