1 Reply Latest reply: May 30, 2013 6:52 AM by Klaus Linhard RSS

    Restful webservice with basic authentication

    Klaus Linhard
      Hi, i am running the following:
      Oracle: 11.2....
      ApexListener: 2.....
      Glassfish: 3.0...
      Apex: 4.2.1

      I have successfully established some restful webservices. Now i want to add a basic authentication to them against an APEX Authentication Scheme which is used in one of my APEX Applications. I cannot find any documentation related to Glassfish or ApexListener or APEX to do that.

      Or are the RESTful Service Privileges which belong to APEX User Goups intent to do a basic authentication ?

      Thanks for your help !

      -- Klaus
        • 1. Re: Restful webservice with basic authentication
          Klaus Linhard
          OK got it solved by my self.

          Solution:

          Define a RESTFUL (POST, PLSQL) Service with the following HEADER parameters:

          authorization          authorization     IN     STRING
          X-APEX-STATUS-CODE     status          OUT     INTEGER


          As per RFC 1945, the Authorization header value should contain the username:password
          as encoded (base64) string. That is what the RESTclient send (over https)

          In the PLSQL i decode :authorization and validate it against APEX Authentication Scheme.
          The result of the validation drives the response header (:status) in PLSQL with 200 (ok) or 401 (Not Authorized)

          -- Klaus