How to use @blackbaud/auth-client - 6 common examples

To help you get started, we’ve selected a few @blackbaud/auth-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github blackbaud / skyux-builder / runtime / bootstrapper.ts View on Github external
const params = new SkyAppRuntimeConfigParams(
            currentUrl,
            this.config.params!
          );

          const ensureContextArgs: BBContextArgs = {
            envId: params.get('envid'),
            envIdRequired: params.isRequired('envid'),
            leId: params.get('leid'),
            leIdRequired: params.isRequired('leid'),
            svcId: params.get('svcid'),
            svcIdRequired: params.isRequired('svcid'),
            url: currentUrl
          };

          return BBContextProvider.ensureContext(ensureContextArgs)
            .then((args) => {
              // The URL will remain the same if the required context is already present, in which
              // case there's no need to update the URL.
              if (args.url !== currentUrl) {
                history.replaceState(
                  {},
                  '',
                  args.url
                );
              }
            });
        });
    } else {
github blackbaud / skyux-builder / src / app / app.component.ts View on Github external
this.zone.runOutsideAngular(() => {
        if (omnibarConfig.experimental) {
          // auth-client 2.0 made the "experimental" omnibar the default; maintain
          // previous behavior until skyux-builder 2.0.
          BBOmnibar.load(omnibarConfig);
        } else {
          BBOmnibarLegacy.load(omnibarConfig);
        }
        omnibarLoaded = true;
      });
    };
github blackbaud / skyux-builder / src / app / app.component.ts View on Github external
this.zone.runOutsideAngular(() => {
        if (omnibarConfig.experimental) {
          // auth-client 2.0 made the "experimental" omnibar the default; maintain
          // previous behavior until skyux-builder 2.0.
          BBOmnibar.load(omnibarConfig);
        } else {
          BBOmnibarLegacy.load(omnibarConfig);
        }
        omnibarLoaded = true;
      });
    };
github blackbaud / skyux-builder / runtime / bootstrapper.ts View on Github external
public static processBootstrapConfig(): Promise {
    if (SkyAppBootstrapper.config && SkyAppBootstrapper.config.auth) {
      return BBAuth.getToken()
        .then(() => {
          const currentUrl = this.getUrl();

          const params = new SkyAppRuntimeConfigParams(
            currentUrl,
            this.config.params!
          );

          const ensureContextArgs: BBContextArgs = {
            envId: params.get('envid'),
            envIdRequired: params.isRequired('envid'),
            leId: params.get('leid'),
            leIdRequired: params.isRequired('leid'),
            svcId: params.get('svcid'),
            svcIdRequired: params.isRequired('svcid'),
            url: currentUrl
github blackbaud / skyux-builder / runtime / auth-token-provider.ts View on Github external
public getToken(args?: BBAuthGetTokenArgs): Promise {
    return BBAuth.getToken(args);
  }
github blackbaud / skyux-builder / src / app / app.component.ts View on Github external
public ngOnDestroy() {
    if (omnibarLoaded) {
      BBOmnibar.destroy();
      omnibarLoaded = false;
    }
  }

@blackbaud/auth-client

Provides methods for obtaining an authentication token from the Blackbaud authentication service.

MIT
Latest version published 7 months ago

Package Health Score

45 / 100
Full package analysis

Similar packages