Remote Service API

Overview - Remote Service API

Are you sure you want to remove this component?

Schoolbox provides a method for integrating remote services via an iframe or new window. It will automatically pass trusted credentials through to your application. Your application can then optionally verify and utilise this information to identify the user accessing the service.

On this page, you will find the following information:

Opening page in iFrame

3rd Party Application Details

Opening page in iFrame

Are you sure you want to remove this component?

In order to open an application in a Schoolbox iframe you must use the following URL in Schoolbox -  http://schoolbox/modules/remote/{base64encodedURL}

The URL you wish to be loaded should be base64 encoded on the end of the string.

You can optionally add /window on the end of the URL to open the page in the complete window rather than an iframe. This will open the page you want in that window without any of the Schoolbox interface around it - Just like opening it up directly on that page like you would with any other link regularly (such as a link you search for in google). The authentication will still work this way too, just in case you were wondering! If you didn't apply the /window, it would open embedded in an iframe with the Schoolbox interface still there.

To encode your URL use the following online tool. http://www.freeformatter.com/base64-encoder.html

If you wish to control the height of the iframe. You may optionally include the parameter (zx_h).

For example before base64 encoding the url.

http://google.com.au#zx_h=800px

3rd Party Application Details

Are you sure you want to remove this component?

Your system will need to have a page which accepts the following GET parameters:

  • key
  • time
  • id
  • user

The id parameter is the current user's External ID. The time parameter is an Epoch/Unix timestamp of the current time generated by Schoolbox. You should ensure that this time is within 5 minutes of the current time on your server for security purposes. Finally, the key parameter is a SHA1 hash of the shared secret, the time and the user's External ID concatenated together in that particular order.

The following is an example scenario where a user has accessed http://10.1.1.31/enrolment_details/ through the custom module we are developing.

Link to http://schoolbox/modules/remote/IGh0dHA6Ly8xMC4xLjEuMzEvZW5yb2xtZW50X2RldGFpbHMv

Internal vars

  • secret = ASDSDF3245324566
  • time = 1323305767
  • id = 24249
  • user = jsmith
  • key = SHA1 hash of [secret][time][externalUserId]

User is redirected to http://10.1.1.31/enrolment_details/?key=01f78cd0b7fdf44268c53e096e6044861ea58614&time=1323305767&id=24249&user=jsmith

The shared secret and URL where the parameters will be passed to for authentication are changeable.

The shared secret is set in Schoolbox at: Admin > Settings > Security > Remote Shared Secret