How to use the angular-oauth2-oidc.JwksValidationHandler function in angular-oauth2-oidc

To help you get started, we’ve selected a few angular-oauth2-oidc 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 btpka3 / btpka3.github.com / js / angular / my-ng4 / src / app / app.component.ts View on Github external
private configureWithNewConfigApi() {
    this.oauthService.configure(authConfig);
    this.oauthService.tokenValidationHandler = new JwksValidationHandler();
    this.oauthService.loadDiscoveryDocumentAndTryLogin();
    this.oauthService.setupAutomaticSilentRefresh();

    this.oauthService.events.subscribe(e => {
      console.debug('oauth/oidc event', e);
    });

    this.oauthService.events.filter(e => e.type === 'session_terminated').subscribe(e => {
      console.debug('Your session has been terminated!');
    });

    this.oauthService.events.filter(e => e.type === 'token_received').subscribe(e => {
      // this.oauthService.loadUserProfile();
    });

  }
github manfredsteyer / angular-oauth2-oidc / sample / src / app / app.component.ts View on Github external
private configureWithNewConfigApi() {

      this.oauthService.configure(authConfig);
      this.oauthService.tokenValidationHandler = new JwksValidationHandler();
      this.oauthService.loadDiscoveryDocumentAndTryLogin();

      // Optional
      this.oauthService.setupAutomaticSilentRefresh();

      this.oauthService.events.subscribe(e => {
        console.debug('oauth/oidc event', e);
      });

      this.oauthService.events.filter(e => e.type === 'session_terminated').subscribe(e => {
        console.debug('Your session has been terminated!');
      });
      
      this.oauthService.events.filter(e => e.type === 'token_received').subscribe(e => {
        // this.oauthService.loadUserProfile();
      });
github manfredsteyer / angular-oauth2-oidc / projects / sample / src / app / app.component.ts View on Github external
private configureImplicitFlow() {
    this.oauthService.configure(authConfig);
    // this.oauthService.setStorage(localStorage);
    this.oauthService.tokenValidationHandler = new JwksValidationHandler();
    this.oauthService.loadDiscoveryDocumentAndTryLogin();


    // Optional
    this.oauthService.setupAutomaticSilentRefresh();

    // Display all events
    this.oauthService.events.subscribe(e => {
      // tslint:disable-next-line:no-console
      console.debug('oauth/oidc event', e);
    });

    this.oauthService.events
      .pipe(filter(e => e.type === 'session_terminated'))
      .subscribe(e => {
        // tslint:disable-next-line:no-console
github manfredsteyer / angular-oauth2-oidc / sample / src / app / app.component.ts View on Github external
this.oauthService.redirectUri = window.location.origin + "/index.html";

    // URL of the SPA to redirect the user after silent refresh
    this.oauthService.silentRefreshRedirectUri = window.location.origin + "/silent-refresh.html";

    // The SPA's id. The SPA is registerd with this id at the auth-server
    this.oauthService.clientId = "spa-demo";

    // set the scope for the permissions the client should request
    // The first three are defined by OIDC. The 4th is a usecase-specific one
    this.oauthService.scope = "openid profile email voucher";

    // Url of the Identity Provider
    this.oauthService.issuer = 'https://steyer-identity-server.azurewebsites.net/identity';

    this.oauthService.tokenValidationHandler = new JwksValidationHandler();

    this.oauthService.events.subscribe(e => {
      console.debug('oauth/oidc event', e);
    });

    // Load Discovery Document and then try to login the user
    this.oauthService.loadDiscoveryDocument().then((doc) => {
      this.oauthService.tryLogin();
    });

    this
      .oauthService
      .events
      .filter(e => e.type == 'token_expires')
      .subscribe(e => {
        console.debug('received token_expires event', e);
github manfredsteyer / angular-oauth2-oidc / projects / sample / src / app / app.component.ts View on Github external
private configureCodeFlow() {

    this.oauthService.configure(authCodeFlowConfig);
    this.oauthService.tokenValidationHandler = new JwksValidationHandler();
    this.oauthService.loadDiscoveryDocumentAndTryLogin();

    // Optional
    // this.oauthService.setupAutomaticSilentRefresh();

  }
github GoogleCloudPlatform / professional-services / tools / bq-visualizer / src / app / google-auth.service.ts View on Github external
private async configureAuth() {
    this.logSvc.debug('configureAuth');
    this.oauthService.configure(environment.authConfig);
    this.oauthService.tokenValidationHandler = new JwksValidationHandler();
    return this.oauthService.loadDiscoveryDocumentAndLogin();
  }
}
github amelmusic / REST-Framework / X.Core / Templates / WebTemplate / Content / src / app / app.component.ts View on Github external
auth() {
      this.oauthService.configure(environment.auth);
      this.oauthService.tokenValidationHandler = new JwksValidationHandler();
      this.oauthService.loadDiscoveryDocumentAndTryLogin({
         onTokenReceived: context => {
            
         }
      });
   }
}
github amelmusic / REST-Framework / X.Core / Web / Content / src / app / app.component.ts View on Github external
auth() {
      this.oauthService.configure(environment.auth);
      this.oauthService.tokenValidationHandler = new JwksValidationHandler();
      this.oauthService.loadDiscoveryDocumentAndTryLogin({
         onTokenReceived: context => {
            
         }
      });
   }
}

angular-oauth2-oidc

Support for OAuth 2 and OpenId Connect (OIDC) in Angular. Already prepared for the upcoming OAuth 2.1.

MIT
Latest version published 8 months ago

Package Health Score

72 / 100
Full package analysis