Skip Navigation

SSO Service

SSO API Client

Acquiring ISsoService

In order to obtain ISsoService and use it you need to import it, e.g.

import {ISsoService} from 'sabre-ngv-communication/interfaces/ISsoService';

Afterwards, inside your source, get the service in the way outlined below:

const ssoService = getService(ISsoService);

Available methods

getAssertion
getAssertion(serviceProviderId: string, additionalParams: Record<string, string>): Promise<string>;

Type Parameteres:

  • serviceProviderId - ID of Service Provider. ID for production and certification environment may be different

  • additionalParams - additional parameters to be included during assertion generation

Returns:
Promise<string>

Promise resolved with assertion value

Note
You can read more about SSO and Service Provider ID here

Authorization

To be able to use SsoService you will need to add authorization to redapp.xml:

<CFBundle>
    <RedApp id="rest-comm-sabre-sample">
        <Authorization name="com.sabre.edge.cf.sso.SsoService"
			threshold="10" metric="tpm" />
    </RedApp>
</CFBundle>

Or in the case of web red app in 'manifest.json':

"authorizations": [
    {
        "name": "com.sabre.edge.cf.sso.SsoService",
        "threshold": "10",
        "metric": "tpm"
    }
],