liftoff

The major advantage of Atlas is its ability to preform authentication, via Single Sign On, and render a satellite application’s shell, or all common components that every satellite application must have. A call to liftoff will ensure the user is authenticated and will start the process rendering of the shell. This process can take some time thus the call returns a promise that is resolved when the shell is finished rendering.

Promise Required

Your application must wait for the promise to be resolved before displaying any account / user specific information.

  
var promise = atlas.liftoff({
  env: "prod",
  mainNavId: "Assgined by Platform"
});
promise.done( function(contexts) {
  // observable username and bearerToken
  authContext = contexts.authContext();
  // observable account, branding, and support information
  accountContext = contexts.accountContext();
});
  

If not present in the DOM launch will add the account-switcher, brand-bar, and main-nav 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>
  <account-switcher></account-switcher>
  <brand-bar></brand-bar>
  <main-nav></main-nav>
  <main>
  <!-- Your Content Here -->
  </main>
  <!-- Scripts -->
</body>
  

Configuration Parameters

Name Type Required Description
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 main-nav. This is assigned to a satellite application by the platform team when the menu item is added.
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.
callbackURL string no [not recommended] Url that auth0 will navigate to after authentication
returnUrl string no [not recommended] Url that the user will be sent to after auth0 and atlas authentication
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
includeAccountContextAndRenderShell boolean no [not recommended] Will calls be made to fetch the accountContext and render the shell

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