Thanks Jenni,
--
You received this message because you are subscribed to the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerner-fhir-developers+unsub...@googlegroups.com.
To post to this group, send email to cerner-fhir-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cerner-fhir-developers/782e5c24-c989-4fc0-8fb0-a1fe095e196b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
var secondUrl = "https://authorization.sandboxcerner.com/tenants/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/protocols/oauth2/profiles/smart-v1/personas/provider/authorize";
request.get(secondUrl, {
'auth': {
'bearer': body.access_token //<-- my access token
},
headers: {
Accept : "application/json+fhir",
"Content-Type": "application/json+fhir"
}
}
var secondUrl = "https://authorization.sandboxcerner.com/tenants/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/protocols/oauth2/profiles/smart-v1/personas/provider/authorize";
request.get(secondUrl, {
'auth': {
'bearer': body.access_token //<-- my access token
},
headers: {
Accept : "application/json+fhir",
"Content-Type": "application/json+fhir"
}
}
'auth': {
'bearer': body.access_token //<-- my access token
},
I think you did not get me.
I think you did not get me.PS this is pretty rude
Currently I cant get a token back.
I launch our webapp, get redirected to the millennium login and then returned to our app with a code.
This is where it gets a little tricky, I nearly always get a 400 error when I call the fhir token endpoint. All I am passing is;
grant_type
code
clientId
redirect_URL
The “code” is directly passed from the first API call, the error below is from fiddler:
HTTP/1.1 400 Bad Request
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: OPTIONS, POST
Access-Control-Allow-Headers: Content-Type, Authorization
Cache-Control: no-store
Pragma: no-cache
Cerner-Correlation-ID: 1fd243d0-6668-490e-973b-f9a054cb9004
Content-Type: application/json;charset=UTF-8
Content-Length: 308
Date: Thu, 12 Jan 2017 12:59:34 GMT
X-Cnection: close
Server: cloud_authorization_server1
Strict-Transport-Security: max-age=631138519; includeSubDomains
{"error":"invalid_grant","error_uri":"https://authorization.sandboxcerner.com/errors/urn%3Acerner%3Aerror%3Aauthorization-server%3Aoauth2%3Atoken%3Acode-invalid-or-expired/instances/1fd243d0-6668-490e-973b-f9a054cb9004?client=cbff8ccb-ee61-480a-9bd8-e3ab2395abbe&tenant=0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca"}
I can see the error message is “code invalid or expired”, but its only just been created, so I guess I am missing something from the POST statement?
If this isnt the same sort of error I can start a new thread if thats easier.
thanks Jenni (and cerner team)
The authorization request was not syntactically valid. Check to make sure the client_id, scopes, and response_type values are correct.
The provider app in cerner portal has the redirect url :Redirect URI: http://localhost:8080/CernerDstu2/index_standalone.htmlAs per my understanding if my login is successful, cerner should redirect to url abovewith a valid state and auth code.
Patient Scopes:
patient/Patient.read
I have just one Patient scope selected. No User scopes selected.
var tokenUrl = "https://authorization.sandboxcerner.com/tenants/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/protocols/oauth2/profiles/smart-v1/token"
var url = "https://fhir-ehr.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Observation?subject%3APatient=3998008"