File tree Expand file tree Collapse file tree 3 files changed +8
-15
lines changed Expand file tree Collapse file tree 3 files changed +8
-15
lines changed Original file line number Diff line number Diff line change 1- import {
2- AbstractValidationHandler ,
3- ValidationParams
4- } from './validation-handler' ;
1+ import { NullValidationHandler } from './null-validation-handler' ;
52
63const err = `PLEASE READ THIS CAREFULLY:
74
@@ -25,19 +22,11 @@ This also results in smaller bundle sizes.
2522 * telling the users that the real one has been moved
2623 * to an library of its own, namely angular-oauth2-oidc-utils
2724 */
28- export class JwksValidationHandler extends AbstractValidationHandler {
25+ export class JwksValidationHandler extends NullValidationHandler {
2926
3027 constructor ( ) {
3128 super ( ) ;
3229 console . error ( err ) ;
3330 }
3431
35- validateSignature ( params : ValidationParams , retry = false ) : Promise < any > {
36- throw new Error ( err ) ;
37- }
38-
39- calcHash ( valueToHash : string , algorithm : string ) : Promise < string > {
40- throw new Error ( err ) ;
41- }
42-
4332}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { Component } from '@angular/core';
22import { OAuthService } from 'angular-oauth2-oidc' ;
33import { authCodeFlowConfig } from 'projects/sample/src/app/auth-code-flow.config' ;
44import { filter } from 'rxjs/operators' ;
5- import { JwksValidationHandler } from 'angular-oauth2-oidc-jwks ' ;
5+ import { JwksValidationHandler } from 'angular-oauth2-oidc' ;
66
77@Component ( {
88 selector : 'app-root' ,
@@ -16,6 +16,8 @@ export class AppComponent {
1616 this . oauthService . configure ( authCodeFlowConfig ) ;
1717 this . oauthService . loadDiscoveryDocumentAndLogin ( ) ;
1818
19+ this . oauthService . tokenValidationHandler = new JwksValidationHandler ( ) ;
20+
1921 // Automatically load user profile
2022 this . oauthService
2123 . events
Original file line number Diff line number Diff line change 2525 "angular-oauth2-oidc" : [
2626 " projects/lib/src/public_api"
2727 ],
28-
28+
2929 "angular-oauth2-oidc-jwks" : [
3030 " projects/angular-oauth2-oidc-jwks/src/public-api"
3131 ]
32+
33+
3234 }
3335 }
3436}
You can’t perform that action at this time.
0 commit comments