Jahia Dev Forum > SSO implementation,...

0 (0 Good)
0 (0 Bad)

SSO implementation, where is the login method?

by  pcasenove »  2011/06/07 20:44

Hello, I try to plug my own SSO system to Jahia, and I want to make a login with the code.
I tried to develop a valve, but it failed, I don't succeed to plug the system.
Which method i should call to simply make a login into Jahia with a username, password?

Thanks you in advance, all helps will be appreciate.
  • SSO implementation, where is the login method?
    2011/06/07 20:44

    pcasenove Hello, I try to plug my own SSO system to Jahia, and I want to make a login with the code.<br/>I tried to develop a valve, but it failed, I don't succeed to plug the system.<br/>Which method i should call to simply make a login into Jahia with a username, password?<br/><br/>Thanks you in advance, all helps will be appreciate.

  • Number of messages  2
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: SSO implementation, where is the login method?

    by  pap@commaro.com »  2011/06/07 20:44

    Hello,

    you can create a subclass of org.jahia.pipelines.valves.SsoValve and overwrite the methods retrieveCredentials and validateCredentials. The method validateCredentials needs to return the username, for which we then call JahiaSiteUserManagerService.getMember (int siteID, String username) and then if the user can be retrieved it will be set as the logged on user.

    You need to set your custom valve as first in the webapps\ROOT\WEB-INF\etc\spring\applicationcontext-pipelines.xml

     

     

    <bean id="authPipeline" class="org.jahia.pipelines.impl.GenericPipeline">
    
        <property name="name" value="authPipeline" />
    
        <property name="valves">
    
            <list>
    
                <bean class="org.jahia.params.valves.YourSsoAuthValveImpl" />
    
                ...
    
            </list>
    
        </property>
    
    <bean>

    Regards,

    Benjamin

    Benjamin Papez (pap@commaro.com)

    Number of messages  220
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page