Authentication

Home Forums LOINC FHIR Terminology Server Authentication

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #270819
    Jesse James
    Participant

    Looking through the documentation, I did not see any section on authenticating to the fhir api. I wanted to test out a few of the sample requests but I am not sure the auth (0auth2 probably?).

    When popping the sample requests into the browser, I am still getting 401 when entering my basic credentials used to sign up.

    Any help would be appreciated!

    Thanks!

    #270822
    Tim Briscoe
    Keymaster

    Hi Jesse,

    It should just be a simple authentication with your LOINC username and password. As you are posting to the forum, I assume you are able to log in to loinc.org so surely it’s not a password error. I’d suggest trying a cURL command to issue an authenticated request. It will prompt for a password.

    curl -X GET -u myloincusername 'https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=4544-3' --header 'Content-Type:application/fhir+json'

    Please let us know whether or not you are able to get it work.

    #270823
    Jesse James
    Participant

    When I do that curl request I still get the 401, I’ve even updated my password and tried again:

    <html>

    <head><title>401 Authorization Required</title></head>

    <body bgcolor=”white”>

    <center><h1>401 Authorization Required</h1></center>

    <hr><center>nginx/1.15.1</center>

    </body>

    </html>

    #270824
    Tim Briscoe
    Keymaster

    Jesse,

    I apologize for the problems. I am unable to reproduce this error. I have tried with a number existing accounts and created a new one specifically to test. All worked successfully with the previous curl command.

    Can I have your permission to change the password on your CragVFX account so I may test it directly? (You can update it thereafter, of course.) We did recently change our authentication storage so there’s a chance there could be something amiss with your account.

    #270825
    Jesse James
    Participant

    Yes, go for it! Thanks for digging in Tim!

    #270826
    Tim Briscoe
    Keymaster

    Jesse,

    I was able to get that cURL command to work with your username and a new password. I tried from multiple hosts. I’m going to email you the new password so you may try yourself. After your testing, I suggest changing your password via http://loinc.org/forgot

    #270827
    Jesse James
    Participant

    It’s working! Thanks Tim! Really appreciate you helping out so quickly!

    #434858
    Marc de Graauw
    Participant

    I’ve got what looks like the same problem. I get:
    <div style=”color: #000000; background-color: #fffffe; font-family: Consolas, ‘Courier New’, monospace; font-size: 12px; line-height: 16px; white-space: pre;”>
    <div><span style=”color: #383838;”><</span><span style=”color: #800000;”>html</span><span style=”color: #383838;”>></span></div>
     
    <div><span style=”color: #383838;”><</span><span style=”color: #800000;”>head</span><span style=”color: #383838;”>></span></div>
    <div>    <span style=”color: #383838;”><</span><span style=”color: #800000;”>title</span><span style=”color: #383838;”>></span>HTTP 401 – Unauthorized<span style=”color: #383838;”></</span><span style=”color: #800000;”>title</span><span style=”color: #383838;”>></span></div>
    <div>    <span style=”color: #383838;”><</span><span style=”color: #800000;”>style</span> <span style=”color: #ff0000;”>type</span><span style=”color: #383838;”>=</span><span style=”color: #0000ff;”>”text/css”</span><span style=”color: #383838;”>></span></div>
    <div>        BODY {</div>
    <div>            font-family: Roboto, Arial;</div>
    <div>        }</div>
    <div>    <span style=”color: #383838;”></</span><span style=”color: #800000;”>style</span><span style=”color: #383838;”>></span></div>
    <div><span style=”color: #383838;”></</span><span style=”color: #800000;”>head</span><span style=”color: #383838;”>></span></div>
     
    <div><span style=”color: #383838;”><</span><span style=”color: #800000;”>body</span><span style=”color: #383838;”>></span></div>
    <div>    <span style=”color: #383838;”><</span><span style=”color: #800000;”>h1</span><span style=”color: #383838;”>></span>HTTP 401 – Unauthorized<span style=”color: #383838;”></</span><span style=”color: #800000;”>h1</span><span style=”color: #383838;”>></span></div>
    <div>    <span style=”color: #383838;”><</span><span style=”color: #800000;”>p</span><span style=”color: #383838;”>></span></div>
    <div>        Failure accessing /CodeSystem/$lookup</div>
    <div>    <span style=”color: #383838;”></</span><span style=”color: #800000;”>p</span><span style=”color: #383838;”>></span></div>
    <div>    <span style=”color: #383838;”><</span><span style=”color: #800000;”>p</span><span style=”color: #383838;”>></span></div>
    <div>        Problem: Unauthorized</div>
    <div>    <span style=”color: #383838;”></</span><span style=”color: #800000;”>p</span><span style=”color: #383838;”>></span></div>
    <div>    <span style=”color: #383838;”><</span><span style=”color: #800000;”>p</span><span style=”color: #383838;”>></span></div>
    <div>        Smile CDR v2020.02.PRE-29 (build c63ddb3650)<span style=”color: #383838;”><</span><span style=”color: #800000;”>br</span><span style=”color: #383838;”>/></span></div>
    <div>        <span style=”color: #383838;”></</span><span style=”color: #800000;”>p</span><span style=”color: #383838;”>></span></div>
    <div><span style=”color: #383838;”></</span><span style=”color: #800000;”>body</span><span style=”color: #383838;”>></span></div>
     
    <div><span style=”color: #383838;”></</span><span style=”color: #800000;”>html</span><span style=”color: #383838;”>></span></div>
    </div>
    <div></div>
    <div>With curl, Postman, direct from browser, all the same. Changed my password, still the same.</div>

    #434859
    Marc de Graauw
    Participant

    Looks like I didn’t paste the HTML response correctly. Anyway, the gist is:

    HTTP 401 – Unauthorized

    with curl, Postman, browser.

    #434864
    Tim Briscoe
    Keymaster

    Hello Marc,

    I apologize for the problem you are receiving. It seems the issue is with the password. Obviously it is working for you as you are able to log in to this site. Can you please reset/change your password to confirm? https://loinc.org/forgot/

    #434883
    Marc de Graauw
    Participant

    Hi Tim,

    Again no luck. Already changed my pwd, changed it again, now to a pwd containing only letters and digits. Still the 401. The new password works fine on the LOINC website itself.

    I can send you my pwd (or maybe you can reset it?) if you mail me at marcdegraauw@gmail.com with an email that does not end in the Forums, so you can try yourself.

    Regards,

    Marc

    #434886
    Tim Briscoe
    Keymaster

    Marc, thank you for your patience. I will follow up with you via email.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.