Nable APIs are authenticated using OAuth 2, an open authorization protocol that grants third party applications limited access to users' account. The authentication and authorization are facilitated only between the end-user and the Nable HTTPS service. OAuth 2 provides dependable security for your application data that can be accessed via web and mobile devices.
SMART client can be registered at. For example https://${Server_Name}/api/fhir_resgistration.php
You can regiseter the app by posting your client name , redirect uri for your client and weather the client will be confidential or public.
There is additional parameter for confidential clients based on their launch. If the clinet wants an EHR launch or App standalone launch.
If the registeration is completed successfully a client_id will be generated. There will also be a client secret generated if the client is confidential.
To get authorization grant from users, make a GET request to the authorization URL with associated parameters.
params:
There will be an additional parameter for EHR launch with launch and for standalone app the additional parameter would be aud
After getting an authorization grant, POST the code to the access token endpoint to get the access token and the refresh token.
params:
Once the access token expires, it can be regenerated using the refresh token by making a POST call to the access token endpoint with following parameters.
params:
You can visit token revocation endpoint to revoke a token.
You can visit token introspection endpoint to check if the token is valid or invalid.
The list of supported scopes are given below:
openid
(Generic mandatory scope)fhirUser
online_access
offline_access
(Will signal server to provide a refresh token)launch
launch/patient
api:fhir
(fhir which are the /fhir/ endpoints)patient/AllergyIntolerance.read
patient/Appointment.read
patient/Binary.read
patient/CarePlan.read
patient/CareTeam.read
patient/Condition.read
patient/Device.read
patient/DiagnosticReport.read
patient/DocumentReference.read
patient/DocumentReference.$docref
patient/Encounter.read
patient/Goal.read
patient/Immunization.read
patient/Location.read
patient/MedicationRequest.read
patient/Medication.read
patient/Observation.read
patient/Organization.read
patient/Patient.read
patient/Person.read
patient/Practitioner.read
patient/Procedure.read
patient/Provenance.read
system/*.$export
user/AllergyIntolerance.read
user/Binary.read
user/CarePlan.read
user/CareTeam.read
user/Condition.read
user/Device.read
user/DiagnosticReport.read
user/DocumentReference.read
user/DocumentReference.$docref
user/Encounter.read
user/Goal.read
user/Immunization.read
user/Location.read
user/MedicationRequest.read
user/Medication.read
user/Observation.read
user/Organization.read
user/Organization.write
user/Patient.read
user/Patient.write
user/Practitioner.read
user/Practitioner.write
user/PractitionerRole.read
user/Procedure.read
user/Provenance.read
user/allergy.read
user/allergy.write
user/appointment.read
user/appointment.write
user/document.read
user/document.write
user/drug.read
user/encounter.read
user/encounter.write
user/immunization.read
user/medication.read
user/medication.write
user/patient.read
user/patient.write
user/practitioner.read
user/practitioner.write
user/procedure.read
user/vital.read
user/vital.write
patient/encounter.read
patient/patient.read