Hi,

You can obtain the Authentitation in any method of any class, because it is
bound to the current thread:
((SecureContext)ContextHolder.getContext()).getAuthentication();

HTH,
Karel


----- Original Message ----- 
From: "Indra Gunawan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 28, 2004 1:14 PM
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
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> _______________________________________________
> Acegisecurity-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
>
>




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Acegisecurity-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer

Reply via email to