Liftoff API

Atlas is initialized by calling the liftoff() method on the Atlas global. There are a number of options, some mandatory, that need to be configured specifically for your satellite application. If you are not using Atlas for authentication with Auth0, you also need to be certain that the user is authenticated and pass their username and bearer token to Atlas during liftoff.

The liftoff method returns a promise that is resolved once the shell has finished rendering.

If you are using Atlas for authentication with Auth0, your application must wait for the promise to resolve before displaying any account or user information.

Resolved Promise

After liftoff, Atlas will resolve a promise with an object that contains 2 observable contexts: authContext and accountContext. For example:

        
Atlas.liftoff(options).then(function(contexts) {
  // observable username and bearerToken
  authContext = contexts.authContext();
  // observable account, branding, and support information
  accountContext = contexts.accountContext();
});
        
      

Required DOM Nodes

If not already present in the DOM at the tiem of liftoff, Atlas will add atlas-account-switcher, brand-bar, and atlas-navigation nodes for you. However, to prevent flashing when the nodes are added it is best practice to include them in the satellite application markup.

        
...
<body>
  <atlas-account-switcher></atlas-account-switcher>
  <brand-bar></brand-bar>
  <atlas-navigation></atlas-navigation>
  <main>
    <!-- Your Content Here -->
  </main>
</body>
...
        
      

Configuration Parameters

Name Type Required Description
accountAlias string | observable string no If the accountAlias is known ahead of time, for instance becuase it is in the URL, this will seed the accountContext.
authenticationEnabled boolean no Default value is false. When enabled, Auth0 will be used to manage authentication.
callbackURL string no [not recommended] Url that auth0 will navigate to after authentication
env string | object yes Valid values are dev, ppe, or prod. An object may be passed for custom enviroments, it must contain the following values auth0ClientID, auth0Domain, controlBaseUrl
mainNavId string | observable string no The id of the menu to select in the atlas-navigation. This is assigned to a satellite application by the platform team when the menu item is added.
onLogin function no Will be called with the authContext. Can be used to set server side cookies
onLogout function no Will be called when the user logs out, can be used to clear server side cookies
returnUrl string no [not recommended] Url that the user will be sent to after auth0 and atlas authentication
useLegacyStyles boolean no When not specified, Atlas will check with the Assets Server for the default value for this setting.

Resolved Data Properties

Name Type Description
authContext observable authContext An observable authContext model
accountContext Observable accountContext An observable accountContext model

AuthContext Model

Name Type Description
username string The currently authenticated user's username
bearerToken string The currently authenticated user's bearerToken

AccountContext Model

Name Type Description
accountAlias string current Account Alias, will either be the root or the impersonated account
branding Branding Model Branding information for the current account
support Support Model Support information for the current account

Support Model

Name Type Description
chatServiceUrl String Url to open a chat with support
featureRequestUrl String Url to open a feature request
knowledgeBaseSearchUrl String Url to search the knowledge base
supportEmail String Email address to support
supportPhone String Phone number of support
supportRequestUrl String Url to open ans support request

Branding Model

Name Type Description
controlLogoutUrl String Url to logout of the Control Portal
controlName String Branded Control Portal Name
controlUrl String Url of the Control Portal
cssUrl String Url to branded CSS file
favIconUrl String Url to Favicon image
headerBackgroundColor String Hex value of the branded header background color
mobileIconUrl String Url to mobile icon image
portalLogoUrl String Url to Control Portal Branded Logo image