CHBase Unify
AnalogJ opened this issue · 3 comments
AnalogJ commented
CHBase Unify's documentation specifies that they follow the [Oauth 2.0 Dynamic Client Registration](https://datatracker.ietf.org/doc/html/rfc7591#section-3.1)
standard, however when I try to register a new client, I get an error {"error":"application_type not supported"}
Docs: https://unify-developer.chbase.com/?page=FHIRAPI
Request:
curl -X POST https://unify-auth.sbx.chbase.com/application/register -H 'Content-Type: application/json' -d '{ "redirect_uris": [ "https://www.example.com/sandbox/callback/chbase", "https://www.example.com/v1/callback/chbase"], "application_name": "Testing Client Name", "application_type": "implicit", "scope": "patient/*.read openid fhirUser", "grant_types": ["authorization_code"] }'
I've tried various application_type
values, including: public
, private
, implicit
, blank.
AnalogJ commented
using "application_type": "web"
returns a different error (same with native
)
{"status":"Error","message":"API Key missing"}%
probably requires a Jwks
or Jwks_uri
value.
AnalogJ commented
{
"custom_definition": true,
"platform_type": "chbase",
"should_override_redirect": false,
"cors_relay_required": true,
"override_redirect": "",
"authorization_endpoint": "https://auth-usa.sbx.unify.chbase.com/api/authorize",
"token_endpoint": "https://auth-usa.sbx.unify.chbase.com/api/token ",
"url": "https://fhir-usa.sbx.unify.chbase.com",
"client_id": "xxxx",
"redirect_uri": "https://lighthouse.fastenhealth.com/sandbox/callback/chbase",
"grant_types_supported": [
"authorization_code"
],
"response_types_supported": [
"code"
],
"response_modes_supported": [
"query"
],
"aud": "https://fhir-usa.sbx.unify.chbase.com",
"scopes_supported": [
"fhirUser",
"offline_access",
"launch/patient",
"patient/*.read"
],
"confidential": false,
"confidential_endpoint": "",
"pkce": true,
"code_challenge_methods_supported": [
"S256"
],
"issuer": "https://fhir-usa.sbx.unify.chbase.com"
}
Status:
- When exchanging code for token, a 500 error occurs.
- Was due to missing
Content-Type: application/x-www-form-urlencoded
header when forwarding for CORS
- Was due to missing
AnalogJ commented
PROD
{
"custom_definition": true,
"platform_type": "chbase",
"should_override_redirect": false,
"cors_relay_required": false,
"override_redirect": "",
"authorization_endpoint": "https://auth-usa.unify.chbase.com/api/authorize",
"token_endpoint": "https://auth-usa.unify.chbase.com/api/token",
"url": "https://fhir-usa.unify.chbase.com",
"client_id": "xxxx",
"redirect_uri": "https://lighthouse.fastenhealth.com/sandbox/callback/chbase",
"grant_types_supported": [
"authorization_code"
],
"response_types_supported": [
"code"
],
"response_modes_supported": [
"fragment"
],
"aud": "https://fhir-usa.unify.chbase.com/",
"scopes_supported": [
"fhirUser",
"openid",
"profile",
"patient/*.read"
],
"confidential": false,
"confidential_endpoint": "",
"pkce": true,
"code_challenge_methods_supported": [
"S256"
],
"issuer": "https://fhir-usa.unify.chbase.com"
}