diff --git a/README.md b/README.md index 8972a681..00268297 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Support for OAuth 2 and OpenId Connect (OIDC) in Angular. Already prepared for t ## Tested Environment -Successfully tested with **Angular 4.3 to Angular 12** and its Router, PathLocationStrategy as well as HashLocationStrategy and CommonJS-Bundling via webpack. +Successfully tested with **Angular 4.3 to Angular 15** and its Router, PathLocationStrategy as well as HashLocationStrategy and CommonJS-Bundling via webpack. At server side we've used **IdentityServer** (.NET / .NET Core), Redhat's **Keycloak** (Java), and **Auth0** (Auth0 is officially supported since version 10 of this lib). For Auth0, please have a look into the respective documentation page here. @@ -28,6 +28,10 @@ For using this library with **Azure Active Directory** (**Azure AD**), we recomm Also, the Okta community created some guidelines on how to use this lib with Okta. See the links at the end of this page for more information. +**Angular 15**: Use 15.x versions of this library (**should also work with older Angular versions!**). + +**Angular 14**: Use 14.x versions of this library (**should also work with older Angular versions!**). + **Angular 13**: Use 13.x versions of this library (**should also work with older Angular versions!**). **Angular 12**: Use 12.x versions of this library (**should also work with older Angular versions!**). @@ -107,7 +111,31 @@ _redirectUris:_ npm i angular-oauth2-oidc --save ``` -## Importing the NgModule + +## Option 1: Standalone APIs + +If you use Standalone Components introduced with Angular 14, you can use our standalone API (call to ``provideOAuthClient``) in your ``main.ts`` to setup the ``OAuthClient``: + +```TypeScript +// main.ts +import { bootstrapApplication } from '@angular/platform-browser'; + +import { provideHttpClient } from '@angular/common/http'; + +import { AppComponent } from './app/app.component'; +import { provideOAuthClient } from 'angular-oauth2-oidc'; + +bootstrapApplication(AppComponent, { + providers: [ + provideHttpClient(), + provideOAuthClient() + ] +}); +``` + +The ``provideOAuthClient`` function takes the same parameters as the forRoot function of the OAuthModule that is still in place for the sake of compatibility with existing code bases. + +## Option 2: Using NgModules ```TypeScript import { HttpClientModule } from '@angular/common/http'; diff --git a/docs/classes/AuthConfig.html b/docs/classes/AuthConfig.html index be73ce4c..8e89d28b 100644 --- a/docs/classes/AuthConfig.html +++ b/docs/classes/AuthConfig.html @@ -111,6 +111,11 @@
+ + + Public + Optional + decreaseExpirationBySec + + + | +
+ Type : number
+
+ |
+
+ Default value : 0
+ |
+
+ Defined in projects/lib/src/auth.config.ts:243
+ |
+
+ Decreases the Expiration time of tokens by this number of seconds + |
+
- Defined in projects/lib/src/auth.config.ts:270
+ Defined in projects/lib/src/auth.config.ts:275
|
- Defined in projects/lib/src/auth.config.ts:258
+ Defined in projects/lib/src/auth.config.ts:263
|
- Defined in projects/lib/src/auth.config.ts:288
+ Defined in projects/lib/src/auth.config.ts:293
|
- Defined in projects/lib/src/auth.config.ts:264
+ Defined in projects/lib/src/auth.config.ts:269
|
- Defined in projects/lib/src/auth.config.ts:251
+ Defined in projects/lib/src/auth.config.ts:256
|
- Defined in projects/lib/src/auth.config.ts:243
+ Defined in projects/lib/src/auth.config.ts:248
|
- Defined in projects/lib/src/oauth-service.ts:2472
+ Defined in projects/lib/src/oauth-service.ts:2476
|
- Defined in projects/lib/src/oauth-service.ts:1246
+ Defined in projects/lib/src/oauth-service.ts:1248
|
- Defined in projects/lib/src/oauth-service.ts:1658
+ Defined in projects/lib/src/oauth-service.ts:1660
|
- Defined in projects/lib/src/oauth-service.ts:1279
+ Defined in projects/lib/src/oauth-service.ts:1281
|
- Defined in projects/lib/src/oauth-service.ts:2668
+ Defined in projects/lib/src/oauth-service.ts:2672
|
- Defined in projects/lib/src/oauth-service.ts:1458
+ Defined in projects/lib/src/oauth-service.ts:1460
|
- Defined in projects/lib/src/oauth-service.ts:2678
+ Defined in projects/lib/src/oauth-service.ts:2682
|
- Defined in projects/lib/src/oauth-service.ts:2737
+ Defined in projects/lib/src/oauth-service.ts:2741
|
- Defined in projects/lib/src/oauth-service.ts:1480
+ Defined in projects/lib/src/oauth-service.ts:1482
|
- Defined in projects/lib/src/oauth-service.ts:2626
+ Defined in projects/lib/src/oauth-service.ts:2630
|
- Defined in projects/lib/src/oauth-service.ts:840
+ Defined in projects/lib/src/oauth-service.ts:842
|
- Defined in projects/lib/src/oauth-service.ts:822
+ Defined in projects/lib/src/oauth-service.ts:824
|
- Defined in projects/lib/src/oauth-service.ts:723
+ Defined in projects/lib/src/oauth-service.ts:725
|
- Defined in projects/lib/src/oauth-service.ts:2377
+ Defined in projects/lib/src/oauth-service.ts:2379
|
- Defined in projects/lib/src/oauth-service.ts:2389
+ Defined in projects/lib/src/oauth-service.ts:2391
|
- Defined in projects/lib/src/oauth-service.ts:2396
+ Defined in projects/lib/src/oauth-service.ts:2398
|
- Defined in projects/lib/src/oauth-service.ts:2459
+ Defined in projects/lib/src/oauth-service.ts:2463
|
- Defined in projects/lib/src/oauth-service.ts:2352
+ Defined in projects/lib/src/oauth-service.ts:2354
|
- Defined in projects/lib/src/oauth-service.ts:2341
+ Defined in projects/lib/src/oauth-service.ts:2343
|
- Defined in projects/lib/src/oauth-service.ts:2363
+ Defined in projects/lib/src/oauth-service.ts:2365
|
- Defined in projects/lib/src/oauth-service.ts:2408
+ Defined in projects/lib/src/oauth-service.ts:2410
|
- Defined in projects/lib/src/oauth-service.ts:2400
+ Defined in projects/lib/src/oauth-service.ts:2402
|
- Defined in projects/lib/src/oauth-service.ts:2381
+ Defined in projects/lib/src/oauth-service.ts:2383
|
- Defined in projects/lib/src/oauth-service.ts:2141
+ Defined in projects/lib/src/oauth-service.ts:2143
|
- Defined in projects/lib/src/oauth-service.ts:2145
+ Defined in projects/lib/src/oauth-service.ts:2147
|
- Defined in projects/lib/src/oauth-service.ts:1359
+ Defined in projects/lib/src/oauth-service.ts:1361
|
- Defined in projects/lib/src/oauth-service.ts:1404
+ Defined in projects/lib/src/oauth-service.ts:1406
|
- Defined in projects/lib/src/oauth-service.ts:1354
+ Defined in projects/lib/src/oauth-service.ts:1356
|
- Defined in projects/lib/src/oauth-service.ts:2419
+ Defined in projects/lib/src/oauth-service.ts:2421
|
- Defined in projects/lib/src/oauth-service.ts:2439
+ Defined in projects/lib/src/oauth-service.ts:2442
|
- Defined in projects/lib/src/oauth-service.ts:2704
+ Defined in projects/lib/src/oauth-service.ts:2708
|
- Defined in projects/lib/src/oauth-service.ts:1634
+ Defined in projects/lib/src/oauth-service.ts:1636
|
- Defined in projects/lib/src/oauth-service.ts:1135
+ Defined in projects/lib/src/oauth-service.ts:1137
|
- Defined in projects/lib/src/oauth-service.ts:1592
+ Defined in projects/lib/src/oauth-service.ts:1594
|
- Defined in projects/lib/src/oauth-service.ts:2692
+ Defined in projects/lib/src/oauth-service.ts:2696
|
- Defined in projects/lib/src/oauth-service.ts:1143
+ Defined in projects/lib/src/oauth-service.ts:1145
|
- Defined in projects/lib/src/oauth-service.ts:1416
+ Defined in projects/lib/src/oauth-service.ts:1418
|
- Defined in projects/lib/src/oauth-service.ts:527
+ Defined in projects/lib/src/oauth-service.ts:529
|
- Defined in projects/lib/src/oauth-service.ts:610
+ Defined in projects/lib/src/oauth-service.ts:612
|
- Defined in projects/lib/src/oauth-service.ts:739
+ Defined in projects/lib/src/oauth-service.ts:741
|
- Defined in projects/lib/src/oauth-service.ts:2483
+ Defined in projects/lib/src/oauth-service.ts:2487
|
- Defined in projects/lib/src/oauth-service.ts:2484
+ Defined in projects/lib/src/oauth-service.ts:2488
|
- Defined in projects/lib/src/oauth-service.ts:2485
+ Defined in projects/lib/src/oauth-service.ts:2489
|
- Defined in projects/lib/src/oauth-service.ts:2486
+ Defined in projects/lib/src/oauth-service.ts:2490
|
- Defined in projects/lib/src/oauth-service.ts:2487
+ Defined in projects/lib/src/oauth-service.ts:2491
|
- Defined in projects/lib/src/oauth-service.ts:2367
+ Defined in projects/lib/src/oauth-service.ts:2369
|
- Defined in projects/lib/src/oauth-service.ts:1259
+ Defined in projects/lib/src/oauth-service.ts:1261
|
- Defined in projects/lib/src/oauth-service.ts:928
+ Defined in projects/lib/src/oauth-service.ts:930
|
- Defined in projects/lib/src/oauth-service.ts:1409
+ Defined in projects/lib/src/oauth-service.ts:1411
|
- Defined in projects/lib/src/oauth-service.ts:1010
+ Defined in projects/lib/src/oauth-service.ts:1012
|
- Defined in projects/lib/src/oauth-service.ts:1654
+ Defined in projects/lib/src/oauth-service.ts:1656
|
- Defined in projects/lib/src/oauth-service.ts:2776
+ Defined in projects/lib/src/oauth-service.ts:2780
|
- Defined in projects/lib/src/oauth-service.ts:1303
+ Defined in projects/lib/src/oauth-service.ts:1305
|
- Defined in projects/lib/src/oauth-service.ts:1020
+ Defined in projects/lib/src/oauth-service.ts:1022
|
- Defined in projects/lib/src/oauth-service.ts:1050
+ Defined in projects/lib/src/oauth-service.ts:1052
|
- Defined in projects/lib/src/oauth-service.ts:1441
+ Defined in projects/lib/src/oauth-service.ts:1443
|
- Defined in projects/lib/src/oauth-service.ts:1451
+ Defined in projects/lib/src/oauth-service.ts:1453
|
- Defined in projects/lib/src/oauth-service.ts:1671
+ Defined in projects/lib/src/oauth-service.ts:1673
|
- Defined in projects/lib/src/oauth-service.ts:2127
+ Defined in projects/lib/src/oauth-service.ts:2129
|
- Defined in projects/lib/src/oauth-service.ts:2137
+ Defined in projects/lib/src/oauth-service.ts:2139
|
- Defined in projects/lib/src/oauth-service.ts:1713
+ Defined in projects/lib/src/oauth-service.ts:1715
|
- Defined in projects/lib/src/oauth-service.ts:1733
+ Defined in projects/lib/src/oauth-service.ts:1735
|
- Defined in projects/lib/src/oauth-service.ts:1974
+ Defined in projects/lib/src/oauth-service.ts:1976
|
- Defined in projects/lib/src/oauth-service.ts:635
+ Defined in projects/lib/src/oauth-service.ts:637
|
- Defined in projects/lib/src/oauth-service.ts:2107
+ Defined in projects/lib/src/oauth-service.ts:2109
|
- Defined in projects/lib/src/oauth-service.ts:1384
+ Defined in projects/lib/src/oauth-service.ts:1386
|
- Defined in AuthConfig:275
+ Defined in
AuthConfig:280
|
+ + + Public + Optional + decreaseExpirationBySec + + + | +
+ Type : number
+
+ |
+
+ Default value : 0
+ |
+
+ Inherited from
+ AuthConfig
+ |
+
+ Defined in
+ AuthConfig:243
+ |
+
+ Decreases the Expiration time of tokens by this number of seconds + |
+
- Defined in AuthConfig:270
+ Defined in
AuthConfig:275
|
- Defined in AuthConfig:258
+ Defined in
AuthConfig:263
|
- Defined in AuthConfig:288
+ Defined in
AuthConfig:293
|
- Defined in AuthConfig:264
+ Defined in
AuthConfig:269
|
- Defined in AuthConfig:251
+ Defined in
AuthConfig:256
|
- Defined in AuthConfig:243
+ Defined in
AuthConfig:248
|