This is a public Forum  publicRSS

Topic

    Shanmugaraj  Murugasen
    SSO: How to make a customer to login to the OsVc
    Topic posted June 16, 2017 by Shanmugaraj MurugasenRookie 
    427 Views, 5 Comments
    Title:
    SSO: How to make a customer to login to the OsVc
    Content:

    Hello,

    Javascript/Node - We are trying to make a call to OsVc through PTA to login as a customer. But the API call getting failed and always returning the HTML as a response where it showing the user is not logged-in. Below is the service details which we are using

    http://<domain>/ci/pta/login/redirect/answers/list/p_li/cF91c2VyaWQ9MTk2MzkzNyZwX2xpX3Bhc3N3ZD1KYWNraWVTaGFu

    We have tried the suggestion given in the below URL but it didn't work. 
    https://cx.rightnow.com/app/answers/detail/a_id/1978/kw/PTA

    Below is our requirement,
    1. We have a different B2C site with customer DB which will be synced between the Platform and OsVc.
    2. We need to implement SSO(Single Sign-on) when the customer logs-in the B2C site, in the background we need to login the customer to the OsVc site. 
    3. In the SSO Process, we can't pass the password. And all the API calls will be handled through Javascript/Node due to the platform constraint. 

    Could anyone help us in resolving the login issue based on the above requirement?

    Thanks 

    Version:
    august2016
    Code Block:

    Answer

     

    • Scott Harwell

      Not sure what your plan is here.  Are you implementing a custom controller (your own API in customer portal), and you're trying to authenticate your customers to that "custom api" using PTA?  You're probably better off integrating to the REST APIs from your Node server(s) instead of this PTA-based approach.

      You might want to change your example URLs, too.  That string is just Base64 encoded and includes a username and password when decoded.

    • Shanmugaraj  Murugasen

      Hi Scott,

      Thanks for the update. Even we are trying to get the REST API for customer login but we are not able to find the REST API services for MAY 2016 version especially for the Customer Login. Is it possible to share the RESTAPI documentation for Customer Login?

       

    • Scott Harwell

      You cannot log contacts into the REST API.  But, your Node service can use a ServiceUser to authenticate to the REST API, and then can provide functions to contacts from their.  If you're using PTA, then you're already using a different IDP to authenticate the contact.  So, if that authentication has happened, then the trust between your IDP and your Node service has been established.  And, there would always be a trust between your Node service and OSvC with the service user.  So, you wouldn't need to actually log the contact into OSvC for access to your custom service in that case.

    • Shanmugaraj  Murugasen

      Hi Scott,

      Can you please let us know what values should be entered in the configuration settings for the following keys?

      PTA_ENCRYPTION_IV
      PTA_ENCRYPTION_KEYGEN
      PTA_ENCRYPTION_METHOD
      PTA_ENCRYPTION_PADDING

      We currently have the following set:

      PTA_ENCRYPTION_IV = aes
      PTA_ENCRYPTION_KEYGEN = 2
      PTA_ENCRYPTION_METHOD = aes256
      PTA_ENCRYPTION_PADDING = 5

      We're currently getting an error code of 9 (Data decryption failed.) so we're assuming that we don't have a correct value specified or our code is incorrect. This is our PHP script that we're testing with: jdoodle.com/a/3U8

       

      Note: All our customers don't have a password. PTA_IGNORE_CONTACT_PASSWORD is enabled.

      Thanks,

      Shan

    • Carl Bramblett

      Hi Shan, I am running into issues with my encrypted login attempt, too. Did you ever get an answer to your question?