Professional Documents
Culture Documents
Using Sso Connect in The Oauth 2 Flow: Diagram
Using Sso Connect in The Oauth 2 Flow: Diagram
Diagram
Integrator related steps of the sequence diagram
1. Request access
On page load check if the user is logged in
Allow the user to log in.
6. Returns to site with authorization code
7. Request access token
8. Returns access token
9. Authorized or not
10. Return authorized or not
A. Refresh access token (not used in SSO Connect)
B. Returns of refreshing access token (not used in SSO Connect)
Diagram
Hidden IFrame
var mySSOInit = new ssoConnect();
// This will create the hidden iFrame from which the SP will broadcast
the messages
// The connect function exposes an onMessage function, from which you
can handle the response
mySSOInit.connect({
onMessage: handleResponse
});
// This will translate the messages the SP has sent
var handleResponse = function (message) {
// And here you can do something with the messages
console.log(message);
};
Visible IFrame
var mySSOiFrame = new ssoConnect();
// Create the iFrame inside a specified container, this will make the
iframe visible
// The connect function exposes an onMessage function, from which you
can handle the response
mySSOiFrame.connect({
container: 'containerId', // ID of the html element where the
iframe should be added
clientId: 'caps-hln-1234', // Service ID for your specific service
redirectUri: 'http://www.hln.be', // Url to which the app should
redirect => is linked with the service ID
hash: '/', // Load the blackbox of the login flow
onMessage: handleResponse
});
// This will translate the messages the SP has sent
var handleResponse = function (message) {
// And here you can do something with the messages
console.log(message);
};
9. Authorized or not
The call to see if the user is authorized or not is the same as Directly use oAuth 2.