How to use @okta/configuration-validation - 4 common examples

To help you get started, we’ve selected a few @okta/configuration-validation 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 Robinyo / serendipity / projects / okta-angular / src / lib / services / auth / okta-auth.service.ts View on Github external
constructor(@Inject(DOCUMENT) private document: any,
              @Inject(OKTA_CONFIG) private auth: OktaConfig,
              private http: HttpClient,
              private router: Router) {

    // Assert Configuration
    assertIssuer(auth.issuer, auth.testing);
    assertClientId(auth.clientId);
    assertRedirectUri(auth.redirectUri);

    this.observers = [];

    this.oktaAuth = new OktaAuth(buildConfigObject(auth));

    this.oktaAuth.userAgent = `${packageInfo.name}/${packageInfo.version} ${this.oktaAuth.userAgent}`;

    /**
     * Scrub scopes to ensure 'openid' is included
     */
    auth.scope = this.scrubScopes(auth.scope);

    /**
     * Cache the auth config.
     */
github Robinyo / serendipity / projects / okta-angular / src / lib / services / auth / okta-auth.service.ts View on Github external
constructor(@Inject(DOCUMENT) private document: any,
              @Inject(OKTA_CONFIG) private auth: OktaConfig,
              private http: HttpClient,
              private router: Router) {

    // Assert Configuration
    assertIssuer(auth.issuer, auth.testing);
    assertClientId(auth.clientId);
    assertRedirectUri(auth.redirectUri);

    this.observers = [];

    this.oktaAuth = new OktaAuth(buildConfigObject(auth));

    this.oktaAuth.userAgent = `${packageInfo.name}/${packageInfo.version} ${this.oktaAuth.userAgent}`;

    /**
     * Scrub scopes to ensure 'openid' is included
     */
    auth.scope = this.scrubScopes(auth.scope);

    /**
     * Cache the auth config.
github Robinyo / serendipity / projects / okta-angular / src / lib / services / auth / okta-auth.service.ts View on Github external
constructor(@Inject(DOCUMENT) private document: any,
              @Inject(OKTA_CONFIG) private auth: OktaConfig,
              private http: HttpClient,
              private router: Router) {

    // Assert Configuration
    assertIssuer(auth.issuer, auth.testing);
    assertClientId(auth.clientId);
    assertRedirectUri(auth.redirectUri);

    this.observers = [];

    this.oktaAuth = new OktaAuth(buildConfigObject(auth));

    this.oktaAuth.userAgent = `${packageInfo.name}/${packageInfo.version} ${this.oktaAuth.userAgent}`;

    /**
     * Scrub scopes to ensure 'openid' is included
     */
    auth.scope = this.scrubScopes(auth.scope);

    /**
     * Cache the auth config.
     */
    this.config = auth;
github Robinyo / serendipity / projects / okta-angular / src / lib / services / auth / okta-auth.service.ts View on Github external
constructor(@Inject(DOCUMENT) private document: any,
              @Inject(OKTA_CONFIG) private auth: OktaConfig,
              private http: HttpClient,
              private router: Router) {

    // Assert Configuration
    assertIssuer(auth.issuer, auth.testing);
    assertClientId(auth.clientId);
    assertRedirectUri(auth.redirectUri);

    this.observers = [];

    this.oktaAuth = new OktaAuth(buildConfigObject(auth));

    this.oktaAuth.userAgent = `${packageInfo.name}/${packageInfo.version} ${this.oktaAuth.userAgent}`;

    /**
     * Scrub scopes to ensure 'openid' is included
     */
    auth.scope = this.scrubScopes(auth.scope);

    /**
     * Cache the auth config.
     */
    this.config = auth;

    this.$authenticationState = new Observable((observer: Observer) => {this.observers.push(observer); });
  }

@okta/configuration-validation

Configuration validation support for Okta JavaScript SDKs

Apache-2.0
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis