Skip to content

Commit 4f62171

Browse files
Re-introduce JwksValidationHandler
Just as a proof of concept, this demonstrates Implicit Flow with v9 of the library. It pulls in the separate package for JWKS validation.
1 parent 24940aa commit 4f62171

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@angular/platform-browser-dynamic": "^9.0.5",
1919
"@angular/router": "^9.0.5",
2020
"angular-oauth2-oidc": "^9.0.0",
21+
"angular-oauth2-oidc-jwks": "^9.0.0",
2122
"core-js": "^2.6.11",
2223
"rxjs": "^6.5.4",
2324
"tslib": "^1.11.1",

src/app/core/core.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HttpClientModule } from '@angular/common/http';
22
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
3-
import { AuthConfig, NullValidationHandler, OAuthModule, OAuthModuleConfig, OAuthStorage, ValidationHandler } from 'angular-oauth2-oidc';
4-
3+
import { AuthConfig, OAuthModule, OAuthModuleConfig, OAuthStorage, ValidationHandler, } from 'angular-oauth2-oidc';
4+
import { JwksValidationHandler } from 'angular-oauth2-oidc-jwks';
55
import { authConfig } from './auth-config';
66
import { AuthGuardWithForcedLogin } from './auth-guard-with-forced-login.service';
77
import { AuthGuard } from './auth-guard.service';
@@ -31,7 +31,7 @@ export class CoreModule {
3131
providers: [
3232
{ provide: AuthConfig, useValue: authConfig },
3333
{ provide: OAuthModuleConfig, useValue: authModuleConfig },
34-
{ provide: ValidationHandler, useClass: NullValidationHandler },
34+
{ provide: ValidationHandler, useClass: JwksValidationHandler },
3535
{ provide: OAuthStorage, useFactory: storageFactory },
3636
]
3737
};

0 commit comments

Comments
 (0)