@rxap/ngx-oauth2-proxy 19.1.0 → 21.0.1-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/compodoc/changelog.html +24 -0
  3. package/compodoc/dependencies.html +9 -9
  4. package/compodoc/injectables/Oauth2ProxyUserProfileDataSource.html +5 -33
  5. package/compodoc/js/search/search_index.js +2 -2
  6. package/compodoc/properties.html +1 -1
  7. package/docs/documentation.json +336 -355
  8. package/docs/html/classes/GetOauth2ProxyUserProfileMethod.html +2 -2
  9. package/docs/html/classes/Oauth2ProxyUserProfileDataSource.html +14 -14
  10. package/docs/html/functions/oauth2ProxyGuard.html +1 -1
  11. package/docs/html/functions/provideOauth2Proxy.html +1 -1
  12. package/docs/html/functions/subscribeToLogoutEvent.html +1 -1
  13. package/docs/html/index.html +2 -2
  14. package/docs/html/interfaces/Oauth2ProxyUserProfile.html +3 -3
  15. package/docs/html/modules.html +1 -1
  16. package/docs/markdown/README.md +1 -1
  17. package/docs/markdown/classes/GetOauth2ProxyUserProfileMethod.md +3 -3
  18. package/docs/markdown/classes/Oauth2ProxyUserProfileDataSource.md +58 -64
  19. package/docs/markdown/functions/oauth2ProxyGuard.md +2 -2
  20. package/docs/markdown/functions/provideOauth2Proxy.md +2 -2
  21. package/docs/markdown/functions/subscribeToLogoutEvent.md +2 -2
  22. package/docs/markdown/globals.md +2 -2
  23. package/docs/markdown/interfaces/Oauth2ProxyUserProfile.md +4 -4
  24. package/docs/wiki/Class.GetOauth2ProxyUserProfileMethod.md +2 -2
  25. package/docs/wiki/Class.Oauth2ProxyUserProfileDataSource.md +57 -63
  26. package/docs/wiki/Function.oauth2ProxyGuard.md +1 -1
  27. package/docs/wiki/Function.provideOauth2Proxy.md +1 -1
  28. package/docs/wiki/Function.subscribeToLogoutEvent.md +1 -1
  29. package/docs/wiki/Interface.Oauth2ProxyUserProfile.md +3 -3
  30. package/docs/wiki/globals.md +1 -1
  31. package/fesm2022/rxap-ngx-oauth2-proxy.mjs +11 -9
  32. package/fesm2022/rxap-ngx-oauth2-proxy.mjs.map +1 -1
  33. package/package.json +31 -30
  34. package/types/rxap-ngx-oauth2-proxy.d.ts +37 -0
  35. package/index.d.ts +0 -4
  36. package/lib/get-oauth2-proxy-user-profile.method.d.ts +0 -19
  37. package/lib/oauth2-proxy-user-profile.data-source.d.ts +0 -8
  38. package/lib/oauth2-proxy.guard.d.ts +0 -2
  39. package/lib/provide-oauth2-proxy.d.ts +0 -3
@@ -15,27 +15,29 @@ class GetOauth2ProxyUserProfileMethod {
15
15
  async call() {
16
16
  return firstValueFrom(this.http.get(this.config.get('oauth2.profileUrl', '/oauth2/userinfo')));
17
17
  }
18
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: GetOauth2ProxyUserProfileMethod, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
19
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: GetOauth2ProxyUserProfileMethod, providedIn: 'root' }); }
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetOauth2ProxyUserProfileMethod, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
19
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetOauth2ProxyUserProfileMethod, providedIn: 'root' }); }
20
20
  }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: GetOauth2ProxyUserProfileMethod, decorators: [{
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetOauth2ProxyUserProfileMethod, decorators: [{
22
22
  type: Injectable,
23
23
  args: [{ providedIn: 'root' }]
24
24
  }] });
25
25
 
26
26
  let Oauth2ProxyUserProfileDataSource = class Oauth2ProxyUserProfileDataSource extends MethodDataSource {
27
- constructor(method) { super(method); }
28
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: Oauth2ProxyUserProfileDataSource, deps: [{ token: GetOauth2ProxyUserProfileMethod }], target: i0.ɵɵFactoryTarget.Injectable }); }
29
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: Oauth2ProxyUserProfileDataSource, providedIn: 'root' }); }
27
+ constructor() {
28
+ super(inject(GetOauth2ProxyUserProfileMethod));
29
+ }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: Oauth2ProxyUserProfileDataSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
31
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: Oauth2ProxyUserProfileDataSource, providedIn: 'root' }); }
30
32
  };
31
33
  Oauth2ProxyUserProfileDataSource = __decorate([
32
34
  RxapDataSource('oauth2-proxy-user-profile'),
33
- __metadata("design:paramtypes", [GetOauth2ProxyUserProfileMethod])
35
+ __metadata("design:paramtypes", [])
34
36
  ], Oauth2ProxyUserProfileDataSource);
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: Oauth2ProxyUserProfileDataSource, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: Oauth2ProxyUserProfileDataSource, decorators: [{
36
38
  type: Injectable,
37
39
  args: [{ providedIn: 'root' }]
38
- }], ctorParameters: () => [{ type: GetOauth2ProxyUserProfileMethod }] });
40
+ }], ctorParameters: () => [] });
39
41
 
40
42
  const oauth2ProxyGuard = async () => {
41
43
  const http = inject(HttpClient);
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-ngx-oauth2-proxy.mjs","sources":["../../../../../packages/angular/oauth2-proxy/src/lib/get-oauth2-proxy-user-profile.method.ts","../../../../../packages/angular/oauth2-proxy/src/lib/oauth2-proxy-user-profile.data-source.ts","../../../../../packages/angular/oauth2-proxy/src/lib/oauth2-proxy.guard.ts","../../../../../packages/angular/oauth2-proxy/src/lib/provide-oauth2-proxy.ts","../../../../../packages/angular/oauth2-proxy/src/index.ts","../../../../../packages/angular/oauth2-proxy/src/rxap-ngx-oauth2-proxy.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport {\n inject,\n Injectable\n} from '@angular/core';\nimport { ConfigService } from '@rxap/config';\nimport { Method } from '@rxap/pattern';\nimport { firstValueFrom } from 'rxjs';\n\nexport interface Oauth2ProxyUserProfile {\n /**\n * User Id of the user\n */\n user: string;\n /**\n * Email address of the user\n */\n email: string;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class GetOauth2ProxyUserProfileMethod implements Method<Oauth2ProxyUserProfile> {\n\n private readonly http = inject(HttpClient);\n\n private readonly config = inject(ConfigService);\n\n async call(): Promise<Oauth2ProxyUserProfile> {\n return firstValueFrom(this.http.get<Oauth2ProxyUserProfile>(this.config.get('oauth2.profileUrl', '/oauth2/userinfo')));\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport {\n MethodDataSource,\n RxapDataSource\n} from '@rxap/data-source';\nimport {\n GetOauth2ProxyUserProfileMethod,\n Oauth2ProxyUserProfile,\n} from './get-oauth2-proxy-user-profile.method';\n\n@Injectable({ providedIn: 'root' })\n@RxapDataSource('oauth2-proxy-user-profile')\nexport class Oauth2ProxyUserProfileDataSource extends MethodDataSource<Oauth2ProxyUserProfile> {\n\n constructor(method: GetOauth2ProxyUserProfileMethod) {super(method);}\n\n}\n","import {\n HttpClient,\n HttpErrorResponse,\n} from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { CanActivateFn } from '@angular/router';\nimport {\n catchError,\n firstValueFrom,\n map,\n of,\n} from 'rxjs';\n\nexport const oauth2ProxyGuard: CanActivateFn = async () => {\n\n const http = inject(HttpClient);\n\n const isAuthenticated = await firstValueFrom(http.get('/oauth2/auth').pipe(\n map(() => true),\n catchError(error => {\n if (error instanceof HttpErrorResponse) {\n if (error.status === 401) {\n return of(false);\n }\n }\n throw error;\n }),\n ));\n\n if (!isAuthenticated) {\n location.replace(location.origin + '/oauth2/sign_in');\n }\n\n return isAuthenticated;\n\n};\n","import { inject, provideAppInitializer } from '@angular/core';\nimport {\n PubSubService,\n RXAP_TOPICS,\n} from '@rxap/ngx-pub-sub';\nimport {\n debounceTime,\n tap,\n} from 'rxjs';\n\nexport function subscribeToLogoutEvent(pubSubService: PubSubService) {\n return () => {\n pubSubService.subscribe(RXAP_TOPICS.authentication.logout).pipe(\n // wait some time to ensure other logout handlers are executed\n debounceTime(64),\n tap(() => location.replace(location.origin + '/oauth2/sign_out'))\n ).subscribe();\n };\n}\n\nexport function provideOauth2Proxy() {\n return provideAppInitializer(() => {\n const initializerFn = (subscribeToLogoutEvent)(inject(PubSubService));\n return initializerFn();\n });\n}\n","// region \nexport * from './lib/get-oauth2-proxy-user-profile.method';\nexport * from './lib/oauth2-proxy-user-profile.data-source';\nexport * from './lib/oauth2-proxy.guard';\nexport * from './lib/provide-oauth2-proxy';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.GetOauth2ProxyUserProfileMethod"],"mappings":";;;;;;;;;MAqBa,+BAA+B,CAAA;AAD5C,IAAA,WAAA,GAAA;AAGmB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AAEzB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;AAMhD;AAJC,IAAA,MAAM,IAAI,GAAA;QACR,OAAO,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAyB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,mBAA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AAe,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,IAAI,CACxE,GAAG,CAAC,MAAM,IAAI,CAAC,EACf,UAAU,CAAC,KAAK,IAAG;AACjB,QAAA,IAAI,KAAK,YAAY,iBAAiB,EAAE;AACtC,YAAA,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,EAAE;AACxB,gBAAA,OAAO,EAAE,CAAC,KAAK,CAAC;;;AAGpB,QAAA,MAAM,KAAK;KACZ,CAAC,CACH,CAAC;IAEF,IAAI,CAAC,eAAe,EAAE;QACpB,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,iBAAiB,CAAC;;AAGvD,IAAA,OAAO,eAAe;AAExB;;ACzBM,SAAU,sBAAsB,CAAC,aAA4B,EAAA;AACjE,IAAA,OAAO,MAAK;QACV,aAAa,CAAC,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI;;QAE7D,YAAY,CAAC,EAAE,CAAC,EAChB,GAAG,CAAC,MAAM,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,kBAAkB,CAAC,CAAC,CAClE,CAAC,SAAS,EAAE;AACf,KAAC;AACH;SAEgB,kBAAkB,GAAA;IAChC,OAAO,qBAAqB,CAAC,MAAK;QAC5B,MAAM,aAAa,GAAG,CAAC,sBAAsB,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;QACrE,OAAO,aAAa,EAAE;AACxB,KAAC,CAAC;AACR;;ACzBA;AAKA;;ACLA;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-ngx-oauth2-proxy.mjs","sources":["../../../../../packages/angular/oauth2-proxy/src/lib/get-oauth2-proxy-user-profile.method.ts","../../../../../packages/angular/oauth2-proxy/src/lib/oauth2-proxy-user-profile.data-source.ts","../../../../../packages/angular/oauth2-proxy/src/lib/oauth2-proxy.guard.ts","../../../../../packages/angular/oauth2-proxy/src/lib/provide-oauth2-proxy.ts","../../../../../packages/angular/oauth2-proxy/src/index.ts","../../../../../packages/angular/oauth2-proxy/src/rxap-ngx-oauth2-proxy.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport {\n inject,\n Injectable\n} from '@angular/core';\nimport { ConfigService } from '@rxap/config';\nimport { Method } from '@rxap/pattern';\nimport { firstValueFrom } from 'rxjs';\n\nexport interface Oauth2ProxyUserProfile {\n /**\n * User Id of the user\n */\n user: string;\n /**\n * Email address of the user\n */\n email: string;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class GetOauth2ProxyUserProfileMethod implements Method<Oauth2ProxyUserProfile> {\n\n private readonly http = inject(HttpClient);\n\n private readonly config = inject(ConfigService);\n\n async call(): Promise<Oauth2ProxyUserProfile> {\n return firstValueFrom(this.http.get<Oauth2ProxyUserProfile>(this.config.get('oauth2.profileUrl', '/oauth2/userinfo')));\n }\n\n}\n","import { Injectable, inject } from '@angular/core';\nimport {\n MethodDataSource,\n RxapDataSource\n} from '@rxap/data-source';\nimport {\n GetOauth2ProxyUserProfileMethod,\n Oauth2ProxyUserProfile,\n} from './get-oauth2-proxy-user-profile.method';\n\n@Injectable({ providedIn: 'root' })\n@RxapDataSource('oauth2-proxy-user-profile')\nexport class Oauth2ProxyUserProfileDataSource extends MethodDataSource<Oauth2ProxyUserProfile> {\n\n constructor() {\n super(inject(GetOauth2ProxyUserProfileMethod));\n }\n\n}\n","import {\n HttpClient,\n HttpErrorResponse,\n} from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { CanActivateFn } from '@angular/router';\nimport {\n catchError,\n firstValueFrom,\n map,\n of,\n} from 'rxjs';\n\nexport const oauth2ProxyGuard: CanActivateFn = async () => {\n\n const http = inject(HttpClient);\n\n const isAuthenticated = await firstValueFrom(http.get('/oauth2/auth').pipe(\n map(() => true),\n catchError(error => {\n if (error instanceof HttpErrorResponse) {\n if (error.status === 401) {\n return of(false);\n }\n }\n throw error;\n }),\n ));\n\n if (!isAuthenticated) {\n location.replace(location.origin + '/oauth2/sign_in');\n }\n\n return isAuthenticated;\n\n};\n","import { inject, provideAppInitializer } from '@angular/core';\nimport {\n PubSubService,\n RXAP_TOPICS,\n} from '@rxap/ngx-pub-sub';\nimport {\n debounceTime,\n tap,\n} from 'rxjs';\n\nexport function subscribeToLogoutEvent(pubSubService: PubSubService) {\n return () => {\n pubSubService.subscribe(RXAP_TOPICS.authentication.logout).pipe(\n // wait some time to ensure other logout handlers are executed\n debounceTime(64),\n tap(() => location.replace(location.origin + '/oauth2/sign_out'))\n ).subscribe();\n };\n}\n\nexport function provideOauth2Proxy() {\n return provideAppInitializer(() => {\n const initializerFn = (subscribeToLogoutEvent)(inject(PubSubService));\n return initializerFn();\n });\n}\n","// region \nexport * from './lib/get-oauth2-proxy-user-profile.method';\nexport * from './lib/oauth2-proxy-user-profile.data-source';\nexport * from './lib/oauth2-proxy.guard';\nexport * from './lib/provide-oauth2-proxy';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAqBa,+BAA+B,CAAA;AAD5C,IAAA,WAAA,GAAA;AAGmB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AAEzB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;AAMhD,IAAA;AAJC,IAAA,MAAM,IAAI,GAAA;QACR,OAAO,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAyB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAAC,CAAC;IACxH;8GARW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA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,QAAA,MAAM,KAAK;IACb,CAAC,CAAC,CACH,CAAC;IAEF,IAAI,CAAC,eAAe,EAAE;QACpB,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,iBAAiB,CAAC;IACvD;AAEA,IAAA,OAAO,eAAe;AAExB;;ACzBM,SAAU,sBAAsB,CAAC,aAA4B,EAAA;AACjE,IAAA,OAAO,MAAK;QACV,aAAa,CAAC,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI;;QAE7D,YAAY,CAAC,EAAE,CAAC,EAChB,GAAG,CAAC,MAAM,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,kBAAkB,CAAC,CAAC,CAClE,CAAC,SAAS,EAAE;AACf,IAAA,CAAC;AACH;SAEgB,kBAAkB,GAAA;IAChC,OAAO,qBAAqB,CAAC,MAAK;QAC5B,MAAM,aAAa,GAAG,CAAC,sBAAsB,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;QACrE,OAAO,aAAa,EAAE;AACxB,IAAA,CAAC,CAAC;AACR;;ACzBA;AAKA;;ACLA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
- "version": "19.1.0",
2
+ "version": "21.0.1-dev.1",
3
3
  "name": "@rxap/ngx-oauth2-proxy",
4
4
  "description": "Provides an Angular guard and utilities for integrating with an OAuth2 Proxy. It includes a guard to protect routes, a method to fetch user profile information, and a data source for managing the user profile. Also provides an app initializer to subscribe to logout events.\n",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "dependencies": {
7
- "@nx/devkit": "20.5.0",
7
+ "@nx/devkit": "22.7.5",
8
8
  "tslib": "2.6.2"
9
9
  },
10
10
  "peerDependencies": {
11
- "@angular/common": "^19.2.1",
12
- "@angular/core": "^19.2.1",
13
- "@angular/router": "^19.2.1",
14
- "@rxap/config": "^19.3.0",
15
- "@rxap/data-source": "^19.2.0",
16
- "@rxap/ngx-pub-sub": "^19.1.0",
17
- "@rxap/pattern": "^1.1.15",
18
- "rxjs": "^7.8.1"
11
+ "@angular/common": "^21.2.9",
12
+ "@angular/core": "^21.2.9",
13
+ "@angular/router": "^21.2.9",
14
+ "@rxap/config": "^21.0.1-dev.1",
15
+ "@rxap/data-source": "^21.0.1-dev.1",
16
+ "@rxap/ngx-pub-sub": "^21.0.1-dev.1",
17
+ "@rxap/pattern": "^1.1.16-dev.1",
18
+ "rxjs": "^7.8.2"
19
19
  },
20
20
  "author": {
21
21
  "name": "Merzough Münker",
@@ -39,71 +39,71 @@
39
39
  "packageGroup": [
40
40
  {
41
41
  "package": "@angular/cdk",
42
- "version": "19.2.19"
42
+ "version": "21.2.9"
43
43
  },
44
44
  {
45
45
  "package": "@angular/common",
46
- "version": "19.2.16"
46
+ "version": "21.2.9"
47
47
  },
48
48
  {
49
49
  "package": "@angular/core",
50
- "version": "19.2.16"
50
+ "version": "21.2.9"
51
51
  },
52
52
  {
53
53
  "package": "@angular/forms",
54
- "version": "19.2.16"
54
+ "version": "21.2.9"
55
55
  },
56
56
  {
57
57
  "package": "@angular/material",
58
- "version": "19.2.19"
58
+ "version": "21.2.9"
59
59
  },
60
60
  {
61
61
  "package": "@angular/platform-browser",
62
- "version": "19.2.16"
62
+ "version": "21.2.9"
63
63
  },
64
64
  {
65
65
  "package": "@angular/router",
66
- "version": "19.2.16"
66
+ "version": "21.2.9"
67
67
  },
68
68
  {
69
69
  "package": "@rxap/config",
70
- "version": "19.3.0"
70
+ "version": "21.0.1-dev.1"
71
71
  },
72
72
  {
73
73
  "package": "@rxap/data-source",
74
- "version": "19.2.0"
74
+ "version": "21.0.1-dev.1"
75
75
  },
76
76
  {
77
77
  "package": "@rxap/data-structure-tree",
78
- "version": "1.1.18"
78
+ "version": "1.1.19-dev.1"
79
79
  },
80
80
  {
81
81
  "package": "@rxap/definition",
82
- "version": "19.0.5"
82
+ "version": "21.0.1-dev.1"
83
83
  },
84
84
  {
85
85
  "package": "@rxap/environment",
86
- "version": "19.2.0"
86
+ "version": "21.0.1-dev.1"
87
87
  },
88
88
  {
89
89
  "package": "@rxap/ngx-pub-sub",
90
- "version": "19.1.0"
90
+ "version": "21.0.1-dev.1"
91
91
  },
92
92
  {
93
93
  "package": "@rxap/pattern",
94
- "version": "1.1.15"
94
+ "version": "1.1.16-dev.1"
95
95
  },
96
96
  {
97
97
  "package": "@rxap/reflect-metadata",
98
- "version": "1.0.17"
98
+ "version": "1.0.18-dev.1"
99
99
  },
100
100
  {
101
101
  "package": "@rxap/rxjs",
102
- "version": "1.1.17"
102
+ "version": "1.1.18-dev.1"
103
103
  },
104
104
  {
105
105
  "package": "@rxap/utilities",
106
- "version": "16.5.1"
106
+ "version": "16.5.2-dev.1"
107
107
  }
108
108
  ]
109
109
  },
@@ -119,15 +119,16 @@
119
119
  "schematics": "./generators.json",
120
120
  "sideEffects": false,
121
121
  "module": "fesm2022/rxap-ngx-oauth2-proxy.mjs",
122
- "typings": "index.d.ts",
122
+ "typings": "types/rxap-ngx-oauth2-proxy.d.ts",
123
123
  "exports": {
124
124
  "./package.json": {
125
125
  "default": "./package.json"
126
126
  },
127
127
  ".": {
128
- "types": "./index.d.ts",
128
+ "types": "./types/rxap-ngx-oauth2-proxy.d.ts",
129
129
  "default": "./fesm2022/rxap-ngx-oauth2-proxy.mjs"
130
130
  },
131
131
  "./theme": "./theme.css"
132
- }
132
+ },
133
+ "type": "module"
133
134
  }
@@ -0,0 +1,37 @@
1
+ import { Method } from '@rxap/pattern';
2
+ import * as i0 from '@angular/core';
3
+ import { MethodDataSource } from '@rxap/data-source';
4
+ import { CanActivateFn } from '@angular/router';
5
+ import { PubSubService } from '@rxap/ngx-pub-sub';
6
+
7
+ interface Oauth2ProxyUserProfile {
8
+ /**
9
+ * User Id of the user
10
+ */
11
+ user: string;
12
+ /**
13
+ * Email address of the user
14
+ */
15
+ email: string;
16
+ }
17
+ declare class GetOauth2ProxyUserProfileMethod implements Method<Oauth2ProxyUserProfile> {
18
+ private readonly http;
19
+ private readonly config;
20
+ call(): Promise<Oauth2ProxyUserProfile>;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<GetOauth2ProxyUserProfileMethod, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<GetOauth2ProxyUserProfileMethod>;
23
+ }
24
+
25
+ declare class Oauth2ProxyUserProfileDataSource extends MethodDataSource<Oauth2ProxyUserProfile> {
26
+ constructor();
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<Oauth2ProxyUserProfileDataSource, never>;
28
+ static ɵprov: i0.ɵɵInjectableDeclaration<Oauth2ProxyUserProfileDataSource>;
29
+ }
30
+
31
+ declare const oauth2ProxyGuard: CanActivateFn;
32
+
33
+ declare function subscribeToLogoutEvent(pubSubService: PubSubService): () => void;
34
+ declare function provideOauth2Proxy(): i0.EnvironmentProviders;
35
+
36
+ export { GetOauth2ProxyUserProfileMethod, Oauth2ProxyUserProfileDataSource, oauth2ProxyGuard, provideOauth2Proxy, subscribeToLogoutEvent };
37
+ export type { Oauth2ProxyUserProfile };
package/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './lib/get-oauth2-proxy-user-profile.method';
2
- export * from './lib/oauth2-proxy-user-profile.data-source';
3
- export * from './lib/oauth2-proxy.guard';
4
- export * from './lib/provide-oauth2-proxy';
@@ -1,19 +0,0 @@
1
- import { Method } from '@rxap/pattern';
2
- import * as i0 from "@angular/core";
3
- export interface Oauth2ProxyUserProfile {
4
- /**
5
- * User Id of the user
6
- */
7
- user: string;
8
- /**
9
- * Email address of the user
10
- */
11
- email: string;
12
- }
13
- export declare class GetOauth2ProxyUserProfileMethod implements Method<Oauth2ProxyUserProfile> {
14
- private readonly http;
15
- private readonly config;
16
- call(): Promise<Oauth2ProxyUserProfile>;
17
- static ɵfac: i0.ɵɵFactoryDeclaration<GetOauth2ProxyUserProfileMethod, never>;
18
- static ɵprov: i0.ɵɵInjectableDeclaration<GetOauth2ProxyUserProfileMethod>;
19
- }
@@ -1,8 +0,0 @@
1
- import { MethodDataSource } from '@rxap/data-source';
2
- import { GetOauth2ProxyUserProfileMethod, Oauth2ProxyUserProfile } from './get-oauth2-proxy-user-profile.method';
3
- import * as i0 from "@angular/core";
4
- export declare class Oauth2ProxyUserProfileDataSource extends MethodDataSource<Oauth2ProxyUserProfile> {
5
- constructor(method: GetOauth2ProxyUserProfileMethod);
6
- static ɵfac: i0.ɵɵFactoryDeclaration<Oauth2ProxyUserProfileDataSource, never>;
7
- static ɵprov: i0.ɵɵInjectableDeclaration<Oauth2ProxyUserProfileDataSource>;
8
- }
@@ -1,2 +0,0 @@
1
- import { CanActivateFn } from '@angular/router';
2
- export declare const oauth2ProxyGuard: CanActivateFn;
@@ -1,3 +0,0 @@
1
- import { PubSubService } from '@rxap/ngx-pub-sub';
2
- export declare function subscribeToLogoutEvent(pubSubService: PubSubService): () => void;
3
- export declare function provideOauth2Proxy(): import("@angular/core").EnvironmentProviders;