How to use the @ordercloud/angular-sdk.Configuration function in @ordercloud/angular-sdk

To help you get started, we’ve selected a few @ordercloud/angular-sdk 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 ordercloud-api / ngx-shopper / src / UI / Buyer / src / app / config / ordercloud-sdk.config.ts View on Github external
export function OcSDKConfig() {
  const apiurl = 'https://api.ordercloud.io';
  const apiVersion = 'v1';
  const authUrl = 'https://auth.ordercloud.io/oauth/token';

  return new Configuration({
    basePath: `${apiurl}/${apiVersion}`,
    authPath: authUrl,
    cookiePrefix: ocAppConfig.appname.replace(/ /g, '_').toLowerCase(),
  });
}
github ordercloud-api / ngx-shopper / src / UI / Seller / src / app / auth / services / app-auth.service.spec.ts View on Github external
beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [
        RouterTestingModule,
        HttpClientTestingModule,
        CookieModule.forRoot(),
      ],
      providers: [
        { provide: Router, useValue: router },
        { provide: CookieService, useValue: cookieService },
        OcAuthService,
        AppAuthService,
        { provide: AppErrorHandler, useValue: appErrorHandler },
        OcTokenService,
        { provide: Configuration, useValue: new Configuration() },
        { provide: applicationConfiguration, useValue: appConfig },
        { provide: AppStateService, useValue: appStateService },
      ],
    });
    appConfig = TestBed.get(applicationConfiguration);
    tokenService = TestBed.get(OcTokenService);
    appAuthService = TestBed.get(AppAuthService);
    authService = TestBed.get(OcAuthService);
  });
github ordercloud-api / ngx-shopper / src / UI / Buyer / src / app / auth / services / app-auth.service.spec.ts View on Github external
beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [
        RouterTestingModule,
        HttpClientTestingModule,
        CookieModule.forRoot(),
      ],
      providers: [
        { provide: Router, useValue: router },
        { provide: CookieService, useValue: cookieService },
        OcAuthService,
        AppAuthService,
        { provide: AppErrorHandler, useValue: appErrorHandler },
        OcTokenService,
        { provide: Configuration, useValue: new Configuration() },
        { provide: applicationConfiguration, useValue: appConfig },
        { provide: AppStateService, useValue: appStateService },
        { provide: BaseResolveService, useValue: baseResolveService },
      ],
    });
    appConfig = TestBed.get(applicationConfiguration);
    tokenService = TestBed.get(OcTokenService);
    appAuthService = TestBed.get(AppAuthService);
    authService = TestBed.get(OcAuthService);
  });
github ordercloud-api / ngx-shopper / src / UI / Buyer / src / app / shared / services / base-resolve / base-resolve.service.spec.ts View on Github external
beforeEach(async(() => {
    const authService = { isUserAnon: jasmine.createSpy('isUserAnon') };
    const appConfig = { appname: 'mgr-dev' };
    TestBed.configureTestingModule({
      imports: [RouterTestingModule, CookieModule.forRoot()],
      providers: [
        { provide: OcAuthService, useValue: authService },
        HttpClient,
        HttpHandler,
        { provide: Configuration, useValue: new Configuration() },
        { provide: applicationConfiguration, useValue: appConfig },
      ],
    });
    service = TestBed.get(BaseResolveService);
  }));

@ordercloud/angular-sdk

angular 6.0.0+ typescript sdk for building on top of the ordercloud platform

MIT
Latest version published 3 years ago

Package Health Score

49 / 100
Full package analysis