You are viewing an old version of this page. View the current version.
Compare with Current View Version History
Version 1 Next »
This document provides technical specifications for authenticating profiles via the membes Single Sign On.
Use this process for a link from third party software to a login form where user is authenticated with both membes and third party software.
membes API
The API needs to be enabled by the membes team, please email support@membes.com.au to have it enabled.
The membes API incurs a setup and ongoing fee (provided on request).
API Keys and ClientID
membes to provide after API has been enabled.
Callback URL
To be provided to membes by third party software provider.
Email callback URL to support@membes.com.au.
Request SSO Form (login form)
https://[website_url]/member/oauthlogin/?redirect_uri=http://callbackurl&client_id=[client_id]&state=[callback_state]
This call will respond with a login form
On Submission of SSO Form
User is authenticated with membes AMS
User is directed to [callback_url]
[callback_url]
Callback to [callback_url] will contain the following parameters
?code=[access_token]
&state=[callback_state]
Access token is valid for one hour. Optionally, a refresh token can be obtained from the membes API.
https://api.membes.com.au/api/oauth2/?refresh_token=[refreshtoken]
Response: { status: true, "access_token": "xxxx-xxxx-xxxx" }
{ status: true, "access_token": "xxxx-xxxx-xxxx" }
Once access token has been obtained, further information about the authenticated user can be obtained from the membes API.
To request access token for the API:
https://api.membes.com.au/api/oauth2/?code=[callback_token]&client_secret=[client_secret]
Response: { status: true, "access_token": "xxx-xxx-xxx-xxx", "refresh_token": "yyy-yyy-yyy"}
{ status: true, "access_token": "xxx-xxx-xxx-xxx", "refresh_token": "yyy-yyy-yyy"}
Use this process if you want to provide a link to the third party software from a user already logged into their membes website.
Membes API
Custom JavaScript can be accessed via the advanced sections of the CMS.
https://userguide.membes.com.au/membes-users-guide/advanced/custom-js-editor
The membes CMS provides a JS object when a user is logged in. This object provides information about the logged in user.
user = {id : "[membes_pk]",profilenumber : "[profile_number]"}
The information in this object can then be used to generate a link to the third party software (custom JS).
The third party software can then use the membes_pk to retrieve information about this user via the membes API