For you to enable SSO into the HealthKey platform, we'd need your platform to be able to generate access tokens, following the OAuth 2.0 protocol, with an OpenID Connect (OIDC) identity layer on top. That means your platform needs to be able to act as an OAuth 2.0 / OIDC authorisation server, and provide HealthKey with the identity of the user — via an ID token and/or a userinfo endpoint — once the user consents to that.
If running a full OAuth authorisation server isn't something you want to take on, we also support a simpler, JWT (or encrypted-token) based integration — see the JWT-based SSO section further down.
You know the basics of how OAuth 2.0 and OpenID Connect (OIDC) work. We've kept things fairly simple, so you don't need to be an OAuth/OIDC expert to be able to integrate with us. As we grow as an organisation, we will look at adding more capabilities on our end. For now, if you'd like us to do more than what we currently do, please get in touch with us and we can have a chat.
The flow of the process is as follows:
Once your platform has the ability to act as an OAuth 2.0 / OIDC authorisation server and generate valid access tokens, we can look at integrating our two platforms together.
In order to keep the coupling between the platforms at a minimum, we'd appreciate it if your API could expose an OpenID Connect discovery endpoint ( {{your_hostname}}/.well-known/openid-configuration/ ), which we call to read the other endpoints. At a minimum, we would need that endpoint to return a JSON containing the following attributes:
{
"issuer": "{{your_hostname}}",
"authorization_endpoint": "{{your_hostname}}/oauth2/v1/authorize",
"token_endpoint": "{{your_hostname}}/oauth2/v1/token",
"userinfo_endpoint": "{{your_hostname}}/oauth2/v1/userinfo",
"response_types_supported": [
"code",
"id_token",
"code id_token",
"code token",
"id_token token",
"code id_token token"
],
"scopes_supported": [
"openid",
"email",
"profile"
],
"code_challenge_methods_supported": [
"S256"
],
"introspection_endpoint": "{{your_hostname}}/oauth2/v1/introspect"
}