You can always get the Authentication object from anywhere by calling 
SecureContext secureContext = (SecureContext)ContextHolder.getContext();
Authentication auth = secureContext.getAuthentication();

Check out the test classes they are very good and always show the way to
use acegi.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf
Of
> Indra Gunawan
> Sent: Wednesday, July 28, 2004 4:14 AM
> To: '[EMAIL PROTECTED]'
> Subject: [Acegisecurity-developer] Getting Authentication object...
> 
> Hi all,
> 
> I have applicationContext.xml like this :
> 
>     <bean id="MTableManagerSecurity"
>
class="net.sf.acegisecurity.intercept.method.MethodSecurityInterceptor">
>         <property name="authenticationManager"><ref
> bean="authenticationManager"/></property>
>         <property name="accessDecisionManager"><ref
> bean="accessDecisionManager"/></property>
>         <property name="objectDefinitionSource">
>             <value>
> 
> com.balicamp.framework.mtable.MTableManager.ping=ROLE_SUPERVISOR
>             </value>
>         </property>
>     </bean>
> 
> MTableManager is a simple class and in method ping I want to get
> Authentication object... is that possible? if yes... how?
> 
> Thanks
> 
> Indra
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Acegisecurity-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer




-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Acegisecurity-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer

Reply via email to