Image

Imagealec_c4 wrote in Imageru_java

Acegi anonymous authentication

Продолжаю фтыкать в ацеги, документация мягко говоря - никакая :( Можно конечно читать apidocs, но меня ломает и читаю человеческий референс :) Сейчас пытаюсь понять как сделать сабж. В applicationContext имею

 <bean id="authenticationManager"
  class="org.acegisecurity.providers.ProviderManager">
  <property name="providers">
   <list>
    <ref local="daoAuthenticationProvider" />
    <ref local="anonymousAuthenticationProvider"/>
   </list>
  </property>
 </bean>

 <bean id="anonymousAuthenticationProvider"
  class="org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider">
  <property name="key"><value>guest</value></property>
 </bean>

 <bean id="anonymousProcessingFilter"
  class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter">
  <property name="key">
   <value>guest</value>
  </property>
  <property name="userAttribute">
   <value>anonymousUser,ROLE_ANONYMOUS</value>
  </property>
 </bean>



Теперь сам вопрос -  как мне организовать обеспечить, чтобы изначально полозователь был залогинен как анонимный пользователь?