NOTE: Trivore ID Documentation has moved to https://trivoreid.com

The content on this site IS OUT OF DATE!

This space has been archived!

Please go ahead to the new site!

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Permalink: https://doc.oneportal.fi/x/q4EW

Using Management API mechanism for SSO is extremely simple. Just use your API credentials and sso-token received from the browser to perform a simple HTTP POST request to the onePortal server and you will be receive all user details as JSON response. The URL for consuming the sso-token is https://<oneportal-hostname>/api/rest/v1/sso/token/<sso-token>. The response from this REST endpoint is identical to retrieving user information via the normal user endpoint located at https://<oneportal-hostname>/api/rest/v1/user/<userId>.

Example request for consuming sso-token
curl -i -X POST -H 'Accept: application/json' --user '<clientId>:<clientSecret>' https://<oneportal-hostname>/api/rest/v1/sso/token/<sso-token>


Example response from SSO token endpoint
{
	"email":"john.smith@example.com",
	"emailVerified":false,
	"id":"58cfb7353874e103fc81ec5f",
	"locale":"en_GB",
	"locked":false,
	"meta":{
		"created":"2017-03-20T11:04:21.534Z",
		"lastModified":"2018-09-21T06:29:05.708Z",
		"location":"https://<oneportal-hostname>/api/rest/v1/sso/token/<sso-token>"
	},
	"mfaMethod":"NONE",
	"mobile":"+358401234567",
	"mobileVerified":true,
	"name":{
		"familyName":"Smith",
		"givenName":"John"
	},
	"nsCode":"test",
	"orgCode":"test",
	"preferredLanguage":"en_GB",
	"username":"john.smith"
}
  • No labels