constructor for CXoneAuth
Checks if instance is leader or not
Method to create singleton object of the class
Method to generate the access token and call the getCXoneConfiguration method in the response to get the api endpoint url from the cxone configuration.
request object containing client id & generated code after authenticate
method to generate new token using existing token
request object containing host url and existing access token
This method returns the Authorization Token Endpoint
icClusterId
domain
Checks if user is logged in and have valid token
Method generate the Authorize url using authorize endpoint with clientId, code challenge, authMode and codeChallengeMethod. This url will be use to open the login screen in page or popup window based on the display value.
get the authmode, whether page or popup
'S256'
authUrl
Method to return branding profiles
@example
getBrandingProfile()
Method to return business unit features
@example
getBusinessUnit()
This method is to get CXone Configurations for authentication purpose
tenantId
@example
getCXoneConfiguration('https://cxone.dev.niceincontact.com','11e85da0-f32c-7e10-898c-0242ac110003');
Check if token is impersonated token
token
Method to get JWKS for verifing jwt token
Method to get discovery endpoints for authentication purposes
Method to return business unit features
@example
getBusinessUnit()
Used to fetch the new access token when the old token is expired the authentication end point we will get from localstorage object 'discovery_response'
method to generate new token using existing token using regional token exchange service
request object containing host url and existing access token
Used to fetch the new access token using regional token endpoint when the old token is expired
Method to get the whoami api response
'authToken'
initialize the auth settings
Use to initializing the util worker and will return the method inside the worker
Method to check token is expired or not
Method to launch CXoneAgent application from SDK
Target div id wherein application needs to be loaded
Application url that needs to be launched
css style params to be applied to iframe
Method used to parse the auth token, user info and store the values to local storage
authToken response
user details after token verification
flag to decide whether to set user info or not
Event handler to receive message event from auth callback popup
restores data and re-initiates auth flow
Method used to process parsed auth token and set user info object
parsed authToken
user details after token verification
flag to decide whether to set user info or not
authToken object
cxone configuration object
Used to start the check for refresh token Here, first we will initiate the worker which have a timeout, this timeout will get triggered based on the expiry time of the token we have passed Once the expiry time is reached the worker will execute the callback to get the refresh token that we have passed
token object which will have refresh token and the expire in detail required to obtain the new token
defines if instance is leader or not
Subscription for response message over broadcast channel
Method to terminate util worker
Use to terminate the util worker instance
Method to verify JWT
Generated using TypeDoc
Class to perform common authentication of user