Hi Erik
Thank you for your help and sorry for such trivial question :). I managed to 
overcome this and I have second instance of magnolia ( public and author) where 
I can deploy the jar and it seems to work.

But I will have one more question if you don't mind :)
Right now I have to introduce login system where I have two possibilities:
1. Magnolia and my own app module will have separated login pages and mechanism
2. Both Magnolia and my own app will use my db and acces to Magnolia pages will 
be possible for the limited users ( my app is going to be some kind of web shop)

I was trying to reach p1 and to configure it to use Spring Security with 
InstallationAwareDelegatingFilterProxy. In that way I got following 
configuration

magnolia web.xml
[code]
<filter>
    <display-name>Magnolia global filters</display-name>
    <filter-name>magnoliaFilterChain</filter-name>
    <filter-class>info.magnolia.cms.filters.MgnlMainFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>magnoliaFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping> 
  

  <listener>
    
<listener-class>info.magnolia.init.[b]MagnoliaServletContextListener[/b]</listener-class>
  </listener>
  <context-param>
    <description>Vaadin production mode</description>
    <param-name>productionMode</param-name>
    <param-value>true</param-value>
  </context-param>
  
  

  <filter>
  <filter-name>[b]springSecurityFilterChain[/b]</filter-name>
  
<filter-class>info.magnolia.module.blossom.web.InstallationAwareDelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
  <filter-name>springSecurityFilterChain</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>[/code]


applicationContext.xml

[code]  <bean 
class="info.magnolia.blossom.sample.module.service.SalesApplicationWebServiceImpl"
 />
  
  <bean id="springSecurityFilterChain" 
class="org.springframework.web.filter.DelegatingFilterProxy"/>[/code]


applicationContext-security.xml

[code]<beans:bean id="authSuccessHandler" 
class="security.auth.AuthenticationSuccessHandler">
                <beans:property name="userLogic" ref="userLogic"/>
        </beans:bean>
        
        <beans:bean id="authFailureHandler" 
class="security.auth.AuthenticationFailureHandler">
        </beans:bean>
        
        <http auto-config="true" use-expressions="true">
            <intercept-url pattern="/**" access="isAuthenticated()" />
                <form-login login-page="/login"                 
                        authentication-success-handler-ref="authSuccessHandler"
                        authentication-failure-handler-ref="authFailureHandler"
                        default-target-url="/"          
                />
                <logout />
        </http>
        
        <beans:bean id="daoAuthenticationProvider" 
class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
          <beans:property name="userDetailsService" ref="userLogic"/>     
          <beans:property name="passwordEncoder" ref="userLogic"/>
          <beans:property name="saltSource" ref="userLogic"/>
        </beans:bean>

        <authentication-manager>
          <authentication-provider ref="daoAuthenticationProvider" />
        </authentication-manager>[/code]
        
UserLogic class

[code]
@Component("[b]userLogic[/b]")
@Scope("singleton")
@Transactional
public class UserLogicImpl extends BaseLogicImpl implements UserLogic, 
UserDetailsService, PasswordEncoder, SaltSource {[/code]


But it doesn't work, when I'm trying to enter on 
http://localhost:9999/magnolia-blossom-sample-webapp/home I'm getting default 
magnolia login page and no my userLogic class in not being used. UserLogic is 
going to be a place where I would like to do all the login operations.

Could you please advice me what I have missed. Or maybe the best way would be 
just to use this same login mechanism for Magnolia and my own app module. I do 
not have anything against it - As I red about it I should use Magnolia's JAAS 
authentication and to write my own authentication class which have to extend 
JCRAuthenticationModule  right ? If so... I stuck at this place and not sure 
what should I do first.

Regards
Jan

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=9edd8eba-b34f-4788-bab1-a875eec35430


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to