Knowledge Management

Get Involved. Join the Conversation.

Topic

    kishore kumar kuna
    How to access Answer/Content along with SSO URL through OKA...Answered
    Topic posted June 12, 2019 by kishore kumar kunaRed Ribbon: 250+ Points, last edited June 12, 2019, tagged Knowledge Advanced, Knowledge Foundation 
    61 Views, 1 Comment
    Title:
    How to access Answer/Content along with SSO URL through OKA Customer Portal
    Summary:
    How to access Answer/Content along with SSO URL through OKA Customer Portal
    Content:

    Hi All,

    We enabled SSO for Knowledge Advance CP Application and able to access successfully through the SSO URL.

    Few of our external systems requires access to particular  KA - CP Content in a single click of SSO URL but when we try pass answer id in the SSO URL  its not working.

    Current Process: External User click on SSO link : https://identity-pt.orgname.com/idp/startSSO.ping?PartnerSpId=OKATest . Once application open, then user search with an answer id.  Its a two step process.

    Expected Process:  Instead of two step, External user wants to access in one single step by clicking on SSO Link: https://identity-pt.orgname.com/idp/startSSO.ping?PartnerSpId=OKATest&answerid=32343242. 

    Can you please help me, how to achieve this Expected process.

    Thank You

    Kishore Kuna

     

    Version:
    19A

    Best Comment

    Dev Aditya

     Hi Kishore,

    We can use pre_page render hook in which we can use $_SERVER['HTTP_REFERER']  function to store orignal requested URL. It is a good approach to do that, however, it needs some POC as I have also never implemented this idea.

    We can use another simpler idea to implement this. In the template which is being used by pages, we set cookie orginal URL(in your case, answer view page of any specific answer) and redirect page to IdP URL.

    Logic will be-

    When user hits any CP page(in your case, answer view page)- template will check if user is logged in or not. We can user session data here for checking.

    If user is logged, page will load

    else- use setcookie function to store orignal URL and redirect him to IdP sso url. 

    When user is authenticated, by default he will be redirected to home page, so, in the template, retrive already set cookie and again redirect user to orignal URL which you get from cookie.

     

    I hope it helps.

     

    Thanks,

    Dev

    Comment

     

    • Dev Aditya

       Hi Kishore,

      We can use pre_page render hook in which we can use $_SERVER['HTTP_REFERER']  function to store orignal requested URL. It is a good approach to do that, however, it needs some POC as I have also never implemented this idea.

      We can use another simpler idea to implement this. In the template which is being used by pages, we set cookie orginal URL(in your case, answer view page of any specific answer) and redirect page to IdP URL.

      Logic will be-

      When user hits any CP page(in your case, answer view page)- template will check if user is logged in or not. We can user session data here for checking.

      If user is logged, page will load

      else- use setcookie function to store orignal URL and redirect him to IdP sso url. 

      When user is authenticated, by default he will be redirected to home page, so, in the template, retrive already set cookie and again redirect user to orignal URL which you get from cookie.

       

      I hope it helps.

       

      Thanks,

      Dev