JavaScript Integration

Introduction

A JavaScript SDK is available to simplify the process of integrating the SSO features into a web based application.

Download SSO JSSDK Demo

NOTE: More complete documentation will be added over time. For now, refer to the downloads for technical details and examples.

Component Initialization

Where applicable, change the code examples below to use the element names present in your application, or authentication parameters provided to you by ClearGage.

	var cg = new ClearGage.Sso({
		clientId: "S3D72C33",
		username: "ssousername",
		password: "ssopassword",
		key:      "N4PTzeuOOpZa",
		name:     "Test User"
	});

By default, the component will make requests to the Production server environment. To make requests against the Demo server, add a key named "mode" with the value of "DEMO" to the initialization:

	var cg = new ClearGage.Sso({
		clientId: "S3D72C33",
		username: "ssousername",
		password: "ssopassword",
		key:      "N4PTzeuOOpZa",
		name:     "Test User",
		mode:     "DEMO"
	});