Announcement

Collapse
No announcement yet.

Authentication Type: Custom Java Class

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Authentication Type: Custom Java Class

    Does anyone have any examples of using a Web Service Listener source connector
    HTTP Authentication
    Authentication Type: Custom Java Class

    Specifically: X509Certificate

    X509 is not a built in option so I assume I need a working java Class.

    ASAP
    Thanks.

  • #2
    I found this but I don't get how to make it work in Mirth Connect.



    https://stackoverflow.com/questions/...09-certificate
    Last edited by StickyBandit; 04-06-2020, 12:29 PM.

    Comment


    • #3
      I figured a lot of it out...

      You need to include/reference httpauth-server.jar from mirth and

      in your java class you have to extend Authenticator and override authenticate...

      extends Authenticator {

      @Override
      public AuthenticationResult authenticate(RequestInfo ri) throws Exception {

      ...and move the code from main into the authenticate method from the example.

      Comment


      • #4
        No I am wondering if this code that was originally in the main method of the link and now inside the authenticate() method in mirth - java.jar.

        Should I be creating a KeyStore file in here?
        Should I be passing in a Base64 Certificate (String) to the authenticate method?

        Is this code generating a WSDL?

        Can mirth still generate a WSDL with authentication info?

        Comment


        • #5
          I figured out how to utilize the*authentication**method* but I added more questions about what we do in that code scope. I had to temporarily give up on mirth doing the SOAP1.2 X509Certificate Authentication and are using Oracle Corporate tools to do this now*and then it forwards to a normal Mirth Connect HttpListener (REST) Web Service.* Basically using 2 ESB's now instead of just one(mirth connect)*because I could not get it to work in Mirth connect in a short period of time.* *I hope to get back to resolving this in the mirth connect tool soon.**And I will try to ask more exact specific questions that NextGen Mirth Connect employees may be able to answer along with more internet searching.
          Last edited by StickyBandit; 04-17-2020, 11:32 AM.

          Comment


          • #6
            ????

            How do I get the soap message inside the authenticate method?

            Is it something like this...

            byte[] soap_message = ri.getEntityProvider().getEntity(); // ????

            or something like this....

            Map<String, Object> extraMap=ri.getExtraProperties();
            String base64_X509Certificate =extraMap.get("BASE64_X509CERTIFICATE").toString() ;
            byte[] certificateX509 = Base64.decodeBase64(base64_X509Certificate);
            String soapMessage = extraMap.get("SOAP_MESSAGE").toString(); // ????

            Comment

            Working...
            X