2 Replies Latest reply: Jan 9, 2013 5:07 AM by Barney RSS

    What is ExternalAuth in psjoa Session connect?

    Barney
      Hi,

      I've written a test Java client to connect to PeopleSoft (tools 8.52) using the psjoa.jar as detailed in Programming Component Interfaces in Java[1]. All good, except that this requires me to keep the user's password to use in the connect method.

      This method also takes a byte array called ExternalAuth, but I cannot find any documentation on what this is. Does anyone know if this doco exists, and if it is possible to use this instead of the password for authentication. If it was something as simple as retrieving the content from a PS_TOKEN cookie and sending it back as the auth data that would be ideal, but I'd just like to find some doco before just guessing at solutions.

      Thanks,

      1. http://docs.oracle.com/cd/E28394_01/pt852pbh1/eng/psbooks/tcpi/book.htm?File=tcpi/htm/tcpi06.htm
        • 1. Re: What is ExternalAuth in psjoa Session connect?
          HakanBiroglu
          when we look at Component Interface PeopleBooks it says:

          Connect
          +(not used in PeopleCode)+

          Connects to the application server.
          Use these interfaces to call with other programming languages.
          +Java: boolean connect(long apiVersion, string server, string username, string password, byte[ ] ExternalAuth)+

          When I generate the Java code for a Component Interface, it generates the following:
          >
          //***** Connect to the App Server *****
          //if the Jolt Password is to be provided, switch to the the second version of the statement below
          if (!oSession.connect(1, strAppServerPath, strUserID, strPassword, null)) {
          //if (!oSession.connectS(1, strAppServerPath, strUserID, strPassword, null, strJoltPwd)){
               System.out.println("\nUnable to Connect to the Application Server. Please verify it is running");
               ErrorHandler();
               return;
          }
          >

          In fact this is the Session Api. When you look at the Api Reference PeopleBooks for the Session Api on the Connect method it says:
          PeopleBooks > PeopleTools 8.52: PeopleCode API Reference > Session Class

          Session Class Methods

          Connect
          Syntax

          (version, {"EXISTING" | //PSoftApplicationServer:JoltPort}, UserID, Password, ExtAuth)
          Description

          The Connect method connects a session object to a PeopleSoft application server.

          Parameters

          version
          Specify the API version that the client is expecting. Future releases will use this parameter. For now, you must use a 1.

          EXISTING | //PSoftApplicationServer:JoltPort
          Specify EXISTING if you’re currently connected to an application server. Otherwise, specify the named application server machine and the IP port to connect to on an application server machine.

          UserID
          Specify the PeopleSoft user ID to use for the connection. This must be a valid user ID. If you are using an existing connection, you can specify a NULL string (that is, two quotation marks with no blank space between them ("")) for this parameter.

          Password
          Specify the password associated with the user ID to use for the connection. This must match the password assigned for this user ID exactly. If you are using an existing connection, you can specify a NULL string (that is, two quotation marks with no blank space between them ("")) for this parameter.

          ExtAuth
          This parameter is required, but it is unused in this release. You must enter a 0 for this parameter.

          So this parameter is not used, but still needs to be provided.
          In Java supply a null for this parameter.

          Hakan
          • 2. Re: What is ExternalAuth in psjoa Session connect?
            Barney
            Hi,

            Thanks for that. I'd read the Component Interface PeopleBooks and seen the code comments in the generated code, but I hadn't made the link from there to the Session class in the PeopleSoft API Reference.

            So it looks like there's no good way to implement SSO without keeping the user's original password somewhere in the client... which doesn't seem an ideal approach.

            Cheers,