Tools and information for 3rd party integrators

OpenID Connect

SmartCentral and Kindyhub Admin supports the OpenID Connect specification as an Identity Provider.

Resources for specifications and sample code libraries:

FAQ

Our OpenID entry point for staging is:

To get JWK public keys :

Create your own test account :

Implicit flow

  • 3rd party sends authorisation request

http://test.smartcentral.net/authorizations/new/?client_id=fancy_app&response_type=id_token%20token&scope=openid%20email&nonce=1234&redirect_uri=http://localhost:3001/auth

  • SmartCentral redirects end user to login page if not logged in, after end user’s authorisation, send the following fields (http form fields encoded) to redirect_uri provided by 3rd party.

    • access_token
    • id_tokenhttps://wiki.smartcentral.net/livepreview/images/save_24.png
    • token_type
  • After 3rd party received id_token (JWT format), the id token should be verified using the public key provided by SmartCentral http://test.smartcentral.net/jwks.json

  • To get readble information of the user, 3rd party sends GET request with access token returned by SmartCentral to http://test.smartcentral.net/user_info?access_token=abcd

  • User info returns the following fields:

    • subject (SmartCentral user unique id)
    • name
    • email

Microsft Active Directory Bridging

The following resources contain information on enabling the use of AD to be an OpenID identity provider:

  • https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc
  • https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/configure-openid-settings

GraphQL

SmartCentral has implemented GraphQL to support an extensible integration method for api access to centre data.

Graphql is currently implemented with persistent token based authentication for fast server to server comms.

Contact us for end points and authentication when you are ready.

Schema

Schema definition is here.

Schema Changelog

  • 2021-10-26 SCHEMA DIFF
  • 2021-10-26 Added support for optionally querying an individual enrolment
  • 2021-10-26 Added child ID as a queryable attribute of service/sessions and service/booked_sessions
  • 2021-10-26 Modified implementation of ‘booking’ object to better handle casual bookings
  • 2021-07-31 Added Contacts list to child object

Planned Changes

We are working on introducing a SmartSync option sometime during November/December 2021. SmartSync will be based on publish/subscribe model and allow integrators to receive real time notifications of an object change.

The basic concept is that integrators can subscribe to a topic of interest (eg ‘enrolments’ ) and receive notifications when an individual enrolment changes , then get the information for that enrolment that’s relevant to them.

The advantage of this process is that for data that changes infrequently (eg child’s contact details, bookings etc.) the speed of updating into downstream systems can be enhanced and the frequency of ‘get all’ operations decreased, reducing load at both ends and enhancing customer experience.

SmartSync will be rolled out for enrolments first, hence the addition in this release of support for querying an individual enrolment in preparation.

The changes will be NON DESTRUCTIVE and INCREMENTAL ie it is entirely optional to implement SmartSync when it becomes available, the current implementations will still work.

The mechanism for subscribing and delivering notifications is yet to be determined. Check back here for further updates or contact us directly.

Sample Query 1

{
  "query": "{
    service(id: 1) {
      id
        enrolments {
          child {
            id
            firstName
            lastName
          }
          parent1 {
	          id
            firstName
            lastName
            email
          }
          parent2 {
            id
            firstName
            lastName
            email
          }
		  startDate
		  status
		  bookings {
			day             
			room
		  }
        }
    }
  }"
}

Sample Query 2

{
  "query": "{
    service(id: 472) {
      id
      enrolments {
        child {
          id
          firstName
          lastName
        }
        parent1 {
          id
          firstName
          lastName
          email
        }
        parent2 {
          id
          firstName
          lastName
          email
        }
        startDate
        status
        endDate
        bookings {
          day
          room
        }
        sessions(date: \"2020-08-06T17:00:01Z\") {
          room
          startTime
          endTime
          absent
        }
      }
    }
  }"
}

Sample Query 3

{

  "query": "{

    service(id: 979) {
      id
      sessions(date: \"2020-08-11\") {
        enrolmentId
        room
        startTime
        endTime
        absent
      }

      enrolments {
          id
          child {
             id
             firstName
             lastName
             dateOfBirth
          }
        }
    }
  }"
}

Sample Query 4

{

  "query": "{
    service(id: 979) {
      id
      sessions(date: \"2020-08-11\") {
          enrolmentId
          room
          startTime
          endTime
          absent
      }
        enrolments {
          id
          child {
            id
            firstName
            lastName
            dateOfBirth
          }
          parent1 {
          id
          firstName
          lastName
          email
          phone
        }
        parent2 {
          id
          firstName
          lastName
          email
          phone
        }
      }
    }
  }"
}