@valtimo/access-control 13.23.0 → 13.24.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.
@@ -102,10 +102,10 @@ class PermissionApiService {
102
102
  requestPermission(request) {
103
103
  return this.http.post(`${this.valtimoEndpointUri}v1/permissions`, request);
104
104
  }
105
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: PermissionApiService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }, { token: i3.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable }); }
106
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: PermissionApiService, providedIn: 'root' }); }
105
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PermissionApiService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }, { token: i3.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable }); }
106
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PermissionApiService, providedIn: 'root' }); }
107
107
  }
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: PermissionApiService, decorators: [{
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PermissionApiService, decorators: [{
109
109
  type: Injectable,
110
110
  args: [{
111
111
  providedIn: 'root',
@@ -214,10 +214,10 @@ class PermissionService {
214
214
  this.logger.debug('Permissions: clear pending');
215
215
  this._pendingPermissions = {};
216
216
  }
217
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: PermissionService, deps: [{ token: i1$1.KeycloakService }, { token: i3.NGXLogger }, { token: PermissionApiService }], target: i0.ɵɵFactoryTarget.Injectable }); }
218
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: PermissionService, providedIn: 'root' }); }
217
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PermissionService, deps: [{ token: i1$1.KeycloakService }, { token: i3.NGXLogger }, { token: PermissionApiService }], target: i0.ɵɵFactoryTarget.Injectable }); }
218
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PermissionService, providedIn: 'root' }); }
219
219
  }
220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: PermissionService, decorators: [{
220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PermissionService, decorators: [{
221
221
  type: Injectable,
222
222
  args: [{
223
223
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"valtimo-access-control.mjs","sources":["../../../../projects/valtimo/access-control/src/lib/models/permission.model.ts","../../../../projects/valtimo/access-control/src/lib/models/index.ts","../../../../projects/valtimo/access-control/src/lib/utils/permission.utils.ts","../../../../projects/valtimo/access-control/src/lib/utils/index.ts","../../../../projects/valtimo/access-control/src/lib/services/permission-api.service.ts","../../../../projects/valtimo/access-control/src/lib/services/permission.service.ts","../../../../projects/valtimo/access-control/src/lib/services/index.ts","../../../../projects/valtimo/access-control/src/public-api.ts","../../../../projects/valtimo/access-control/src/valtimo-access-control.ts"],"sourcesContent":["/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Subject} from 'rxjs';\n\ninterface PermissionContext {\n identifier: string;\n resource: string;\n}\n\ninterface PermissionRequest {\n action: string;\n resource: string;\n context?: PermissionContext;\n}\n\ntype PermissionRequestQueue = Array<PermissionRequest>;\n\ninterface PermissionResponse {\n request: PermissionRequest;\n available: boolean;\n}\n\ninterface CachedResolvedPermissions {\n [permissionRequestKey: string]: boolean;\n}\n\ninterface PendingPermissions {\n [permissionRequestKey: string]: Subject<boolean>;\n}\n\ninterface ResolvedPermissions {\n [permissionRequestKey: string]: boolean;\n}\n\nexport {\n CachedResolvedPermissions,\n PendingPermissions,\n PermissionContext,\n PermissionRequest,\n PermissionRequestQueue,\n PermissionResponse,\n ResolvedPermissions,\n};\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './permission.model';\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {PermissionRequest} from '../models';\n\nconst getPermissionRequestKey = (permissionRequest: PermissionRequest): string => {\n const input = JSON.stringify(permissionRequest);\n const len = input.length;\n\n let hash = 0;\n\n for (let i = 0; i < len; i++) {\n hash = (hash << 5) - hash + input.charCodeAt(i);\n hash |= 0; // to 32bit integer\n }\n return `${hash}`;\n};\n\nexport {getPermissionRequestKey};\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './permission.utils';\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpClient} from '@angular/common/http';\nimport {Injectable} from '@angular/core';\nimport {ConfigService} from '@valtimo/shared';\nimport {map, Observable} from 'rxjs';\nimport {\n PermissionRequest,\n PermissionRequestQueue,\n PermissionResponse,\n ResolvedPermissions,\n} from '../models';\nimport {getPermissionRequestKey} from '../utils';\nimport {NGXLogger} from 'ngx-logger';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PermissionApiService {\n private valtimoEndpointUri: string;\n\n constructor(\n private readonly http: HttpClient,\n private readonly configService: ConfigService,\n private readonly logger: NGXLogger\n ) {\n this.valtimoEndpointUri = this.configService.config.valtimoApi.endpointUri;\n }\n\n public resolvePermissionRequestQueue(\n permissionRequestQueue: PermissionRequestQueue\n ): Observable<ResolvedPermissions> {\n this.logger.debug('Permissions: request to resolve permission queue', permissionRequestQueue);\n\n return this.requestPermission(permissionRequestQueue).pipe(\n map((res: PermissionResponse[]) => {\n const keys: string[] = permissionRequestQueue.map(permissionRequest =>\n getPermissionRequestKey(permissionRequest)\n );\n\n return res.reduce(\n (acc: ResolvedPermissions, curr: PermissionResponse, index: number) => ({\n ...acc,\n [keys[index]]: curr.available,\n }),\n {}\n );\n })\n );\n }\n\n public requestPermission(request: PermissionRequest[]): Observable<PermissionResponse[]> {\n return this.http.post<PermissionResponse[]>(\n `${this.valtimoEndpointUri}v1/permissions`,\n request\n );\n }\n}\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {jwtDecode} from 'jwt-decode';\nimport {KeycloakService} from 'keycloak-angular';\nimport {NGXLogger} from 'ngx-logger';\nimport {Observable, of, Subject, Subscription, switchMap, take, timer} from 'rxjs';\nimport {fromPromise} from 'rxjs/internal/observable/innerFrom';\nimport {\n CachedResolvedPermissions,\n PendingPermissions,\n PermissionContext,\n PermissionRequest,\n PermissionRequestQueue,\n ResolvedPermissions,\n} from '../models';\nimport {PermissionApiService} from './permission-api.service';\nimport {getPermissionRequestKey} from '../utils';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PermissionService {\n private readonly QUEUE_COLLECTION_PERIOD_MS = 15;\n private _cachedResolvedPermissions: CachedResolvedPermissions = {};\n private _pendingPermissions: PendingPermissions = {};\n private _permissionRequestQueue: PermissionRequestQueue = [];\n private _permissionQueueSubscription!: Subscription;\n private _clearCacheSubscription!: Subscription;\n\n constructor(\n private readonly keyCloakService: KeycloakService,\n private readonly logger: NGXLogger,\n private readonly permissionApiService: PermissionApiService\n ) {}\n\n public requestPermission(\n permissionRequest: PermissionRequest,\n context?: PermissionContext\n ): Observable<boolean> {\n const permissionRequestWithContext = {...permissionRequest, context};\n const permissionRequestKey = getPermissionRequestKey(permissionRequestWithContext);\n const cachedResolvedPermission = this._cachedResolvedPermissions[permissionRequestKey];\n const pendingPermissionRequest = this._pendingPermissions[permissionRequestKey];\n\n if (Object.keys(this._cachedResolvedPermissions).includes(permissionRequestKey)) {\n this.logger.debug(\n 'Permissions: return cached resolved permission',\n permissionRequestKey,\n cachedResolvedPermission\n );\n\n return of(cachedResolvedPermission);\n }\n\n if (pendingPermissionRequest) {\n this.logger.debug('Permissions: return existing pending permission', permissionRequestKey);\n\n return pendingPermissionRequest;\n }\n\n this._pendingPermissions[permissionRequestKey] = new Subject<boolean>();\n\n this.queuePermission(permissionRequestWithContext);\n\n this.logger.debug('Permissions: return new pending', permissionRequestKey);\n\n return this._pendingPermissions[permissionRequestKey].asObservable();\n }\n\n private queuePermission(permissionRequest: PermissionRequest): void {\n if (!this._permissionQueueSubscription || this._permissionQueueSubscription.closed) {\n this.logger.debug('Permissions: open new queue subscription');\n\n this.openQueueSubscription();\n }\n\n this._permissionRequestQueue.push(permissionRequest);\n\n this.logger.debug(`Permissions: add request to queue: ${JSON.stringify(permissionRequest)}`);\n }\n\n private openQueueSubscription(): void {\n this._permissionQueueSubscription = timer(this.QUEUE_COLLECTION_PERIOD_MS).subscribe(() => {\n this.logger.debug('Permissions: queue timer finished');\n\n const queueCopy = [...this._permissionRequestQueue];\n\n this.emptyQueue();\n\n this.permissionApiService\n .resolvePermissionRequestQueue(queueCopy)\n .pipe(take(1))\n .subscribe(resolvedPermissions => {\n Object.keys(resolvedPermissions).forEach(permissionRequestKey => {\n this._pendingPermissions[permissionRequestKey].next(\n resolvedPermissions[permissionRequestKey]\n );\n this.logger.debug(\n `Permissions: resolved pending permission request ${permissionRequestKey}`,\n resolvedPermissions[permissionRequestKey]\n );\n });\n\n this.cacheResolvedPermissions(resolvedPermissions);\n });\n });\n }\n\n private cacheResolvedPermissions(resolvedPermissions: ResolvedPermissions): void {\n Object.keys(resolvedPermissions).forEach(permissionRequestKey => {\n this._cachedResolvedPermissions[permissionRequestKey] =\n resolvedPermissions[permissionRequestKey];\n this.logger.debug('Permissions: cache resolved permission request', permissionRequestKey);\n });\n\n if (!this._clearCacheSubscription || this._clearCacheSubscription.closed) {\n this.openClearCacheSubscription();\n }\n }\n\n private openClearCacheSubscription(): void {\n this._clearCacheSubscription = fromPromise(this.keyCloakService.getToken())\n .pipe(\n take(1),\n switchMap(token => {\n const tokenExp = jwtDecode(token).exp * 1000;\n const expiryTime = tokenExp - Date.now() - 1000;\n return timer(expiryTime);\n })\n )\n .subscribe(() => {\n this.clearPending();\n this.clearCache();\n });\n }\n\n private emptyQueue(): void {\n this.logger.debug('Permissions: empty queue');\n this._permissionRequestQueue = [];\n }\n\n private clearCache(): void {\n this.logger.debug('Permissions: clear cache');\n this._cachedResolvedPermissions = {};\n }\n\n private clearPending(): void {\n this.logger.debug('Permissions: clear pending');\n this._pendingPermissions = {};\n }\n}\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './permission.service';\nexport * from './permission-api.service';\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of access-control\n */\n\nexport * from './lib/models';\nexport * from './lib/services';\nexport * from './lib/utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2","i3.PermissionApiService"],"mappings":";;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;;ACdH;;;;;;;;;;;;;;AAcG;;ACdH;;;;;;;;;;;;;;AAcG;AAIH,MAAM,uBAAuB,GAAG,CAAC,iBAAoC,KAAY;IAC/E,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC;AAC/C,IAAA,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM;IAExB,IAAI,IAAI,GAAG,CAAC;AAEZ,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;AAC5B,QAAA,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AAC/C,QAAA,IAAI,IAAI,CAAC,CAAC;IACZ;IACA,OAAO,CAAA,EAAG,IAAI,CAAA,CAAE;AAClB;;AC7BA;;;;;;;;;;;;;;AAcG;;MCkBU,oBAAoB,CAAA;AAG/B,IAAA,WAAA,CACmB,IAAgB,EAChB,aAA4B,EAC5B,MAAiB,EAAA;QAFjB,IAAA,CAAA,IAAI,GAAJ,IAAI;QACJ,IAAA,CAAA,aAAa,GAAb,aAAa;QACb,IAAA,CAAA,MAAM,GAAN,MAAM;AAEvB,QAAA,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,C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ChB,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC;AAC7C,QAAA,IAAI,CAAC,uBAAuB,GAAG,EAAE;IACnC;IAEQ,UAAU,GAAA;AAChB,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC;AAC7C,QAAA,IAAI,CAAC,0BAA0B,GAAG,EAAE;IACtC;IAEQ,YAAY,GAAA;AAClB,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,4BAA4B,CAAC;AAC/C,QAAA,IAAI,CAAC,mBAAmB,GAAG,EAAE;IAC/B;+GAhIW,iBAAiB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,eAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,EAAA,CAAA,SAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,oBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFhB,MAAM,EAAA,CAAA,CAAA;;4FAEP,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACnCD;;;;;;;;;;;;;;AAcG;;ACdH;;;;;;;;;;;;;;AAcG;AAEH;;AAEG;;AClBH;;AAEG;;;;"}
1
+ {"version":3,"file":"valtimo-access-control.mjs","sources":["../../../../projects/valtimo/access-control/src/lib/models/permission.model.ts","../../../../projects/valtimo/access-control/src/lib/models/index.ts","../../../../projects/valtimo/access-control/src/lib/utils/permission.utils.ts","../../../../projects/valtimo/access-control/src/lib/utils/index.ts","../../../../projects/valtimo/access-control/src/lib/services/permission-api.service.ts","../../../../projects/valtimo/access-control/src/lib/services/permission.service.ts","../../../../projects/valtimo/access-control/src/lib/services/index.ts","../../../../projects/valtimo/access-control/src/public-api.ts","../../../../projects/valtimo/access-control/src/valtimo-access-control.ts"],"sourcesContent":["/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Subject} from 'rxjs';\n\ninterface PermissionContext {\n identifier: string;\n resource: string;\n}\n\ninterface PermissionRequest {\n action: string;\n resource: string;\n context?: PermissionContext;\n}\n\ntype PermissionRequestQueue = Array<PermissionRequest>;\n\ninterface PermissionResponse {\n request: PermissionRequest;\n available: boolean;\n}\n\ninterface CachedResolvedPermissions {\n [permissionRequestKey: string]: boolean;\n}\n\ninterface PendingPermissions {\n [permissionRequestKey: string]: Subject<boolean>;\n}\n\ninterface ResolvedPermissions {\n [permissionRequestKey: string]: boolean;\n}\n\nexport {\n CachedResolvedPermissions,\n PendingPermissions,\n PermissionContext,\n PermissionRequest,\n PermissionRequestQueue,\n PermissionResponse,\n ResolvedPermissions,\n};\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './permission.model';\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {PermissionRequest} from '../models';\n\nconst getPermissionRequestKey = (permissionRequest: PermissionRequest): string => {\n const input = JSON.stringify(permissionRequest);\n const len = input.length;\n\n let hash = 0;\n\n for (let i = 0; i < len; i++) {\n hash = (hash << 5) - hash + input.charCodeAt(i);\n hash |= 0; // to 32bit integer\n }\n return `${hash}`;\n};\n\nexport {getPermissionRequestKey};\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './permission.utils';\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpClient} from '@angular/common/http';\nimport {Injectable} from '@angular/core';\nimport {ConfigService} from '@valtimo/shared';\nimport {map, Observable} from 'rxjs';\nimport {\n PermissionRequest,\n PermissionRequestQueue,\n PermissionResponse,\n ResolvedPermissions,\n} from '../models';\nimport {getPermissionRequestKey} from '../utils';\nimport {NGXLogger} from 'ngx-logger';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PermissionApiService {\n private valtimoEndpointUri: string;\n\n constructor(\n private readonly http: HttpClient,\n private readonly configService: ConfigService,\n private readonly logger: NGXLogger\n ) {\n this.valtimoEndpointUri = this.configService.config.valtimoApi.endpointUri;\n }\n\n public resolvePermissionRequestQueue(\n permissionRequestQueue: PermissionRequestQueue\n ): Observable<ResolvedPermissions> {\n this.logger.debug('Permissions: request to resolve permission queue', permissionRequestQueue);\n\n return this.requestPermission(permissionRequestQueue).pipe(\n map((res: PermissionResponse[]) => {\n const keys: string[] = permissionRequestQueue.map(permissionRequest =>\n getPermissionRequestKey(permissionRequest)\n );\n\n return res.reduce(\n (acc: ResolvedPermissions, curr: PermissionResponse, index: number) => ({\n ...acc,\n [keys[index]]: curr.available,\n }),\n {}\n );\n })\n );\n }\n\n public requestPermission(request: PermissionRequest[]): Observable<PermissionResponse[]> {\n return this.http.post<PermissionResponse[]>(\n `${this.valtimoEndpointUri}v1/permissions`,\n request\n );\n }\n}\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {jwtDecode} from 'jwt-decode';\nimport {KeycloakService} from 'keycloak-angular';\nimport {NGXLogger} from 'ngx-logger';\nimport {Observable, of, Subject, Subscription, switchMap, take, timer} from 'rxjs';\nimport {fromPromise} from 'rxjs/internal/observable/innerFrom';\nimport {\n CachedResolvedPermissions,\n PendingPermissions,\n PermissionContext,\n PermissionRequest,\n PermissionRequestQueue,\n ResolvedPermissions,\n} from '../models';\nimport {PermissionApiService} from './permission-api.service';\nimport {getPermissionRequestKey} from '../utils';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PermissionService {\n private readonly QUEUE_COLLECTION_PERIOD_MS = 15;\n private _cachedResolvedPermissions: CachedResolvedPermissions = {};\n private _pendingPermissions: PendingPermissions = {};\n private _permissionRequestQueue: PermissionRequestQueue = [];\n private _permissionQueueSubscription!: Subscription;\n private _clearCacheSubscription!: Subscription;\n\n constructor(\n private readonly keyCloakService: KeycloakService,\n private readonly logger: NGXLogger,\n private readonly permissionApiService: PermissionApiService\n ) {}\n\n public requestPermission(\n permissionRequest: PermissionRequest,\n context?: PermissionContext\n ): Observable<boolean> {\n const permissionRequestWithContext = {...permissionRequest, context};\n const permissionRequestKey = getPermissionRequestKey(permissionRequestWithContext);\n const cachedResolvedPermission = this._cachedResolvedPermissions[permissionRequestKey];\n const pendingPermissionRequest = this._pendingPermissions[permissionRequestKey];\n\n if (Object.keys(this._cachedResolvedPermissions).includes(permissionRequestKey)) {\n this.logger.debug(\n 'Permissions: return cached resolved permission',\n permissionRequestKey,\n cachedResolvedPermission\n );\n\n return of(cachedResolvedPermission);\n }\n\n if (pendingPermissionRequest) {\n this.logger.debug('Permissions: return existing pending permission', permissionRequestKey);\n\n return pendingPermissionRequest;\n }\n\n this._pendingPermissions[permissionRequestKey] = new Subject<boolean>();\n\n this.queuePermission(permissionRequestWithContext);\n\n this.logger.debug('Permissions: return new pending', permissionRequestKey);\n\n return this._pendingPermissions[permissionRequestKey].asObservable();\n }\n\n private queuePermission(permissionRequest: PermissionRequest): void {\n if (!this._permissionQueueSubscription || this._permissionQueueSubscription.closed) {\n this.logger.debug('Permissions: open new queue subscription');\n\n this.openQueueSubscription();\n }\n\n this._permissionRequestQueue.push(permissionRequest);\n\n this.logger.debug(`Permissions: add request to queue: ${JSON.stringify(permissionRequest)}`);\n }\n\n private openQueueSubscription(): void {\n this._permissionQueueSubscription = timer(this.QUEUE_COLLECTION_PERIOD_MS).subscribe(() => {\n this.logger.debug('Permissions: queue timer finished');\n\n const queueCopy = [...this._permissionRequestQueue];\n\n this.emptyQueue();\n\n this.permissionApiService\n .resolvePermissionRequestQueue(queueCopy)\n .pipe(take(1))\n .subscribe(resolvedPermissions => {\n Object.keys(resolvedPermissions).forEach(permissionRequestKey => {\n this._pendingPermissions[permissionRequestKey].next(\n resolvedPermissions[permissionRequestKey]\n );\n this.logger.debug(\n `Permissions: resolved pending permission request ${permissionRequestKey}`,\n resolvedPermissions[permissionRequestKey]\n );\n });\n\n this.cacheResolvedPermissions(resolvedPermissions);\n });\n });\n }\n\n private cacheResolvedPermissions(resolvedPermissions: ResolvedPermissions): void {\n Object.keys(resolvedPermissions).forEach(permissionRequestKey => {\n this._cachedResolvedPermissions[permissionRequestKey] =\n resolvedPermissions[permissionRequestKey];\n this.logger.debug('Permissions: cache resolved permission request', permissionRequestKey);\n });\n\n if (!this._clearCacheSubscription || this._clearCacheSubscription.closed) {\n this.openClearCacheSubscription();\n }\n }\n\n private openClearCacheSubscription(): void {\n this._clearCacheSubscription = fromPromise(this.keyCloakService.getToken())\n .pipe(\n take(1),\n switchMap(token => {\n const tokenExp = jwtDecode(token).exp * 1000;\n const expiryTime = tokenExp - Date.now() - 1000;\n return timer(expiryTime);\n })\n )\n .subscribe(() => {\n this.clearPending();\n this.clearCache();\n });\n }\n\n private emptyQueue(): void {\n this.logger.debug('Permissions: empty queue');\n this._permissionRequestQueue = [];\n }\n\n private clearCache(): void {\n this.logger.debug('Permissions: clear cache');\n this._cachedResolvedPermissions = {};\n }\n\n private clearPending(): void {\n this.logger.debug('Permissions: clear pending');\n this._pendingPermissions = {};\n }\n}\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './permission.service';\nexport * from './permission-api.service';\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of access-control\n */\n\nexport * from './lib/models';\nexport * from './lib/services';\nexport * from './lib/utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2","i3.PermissionApiService"],"mappings":";;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;;ACdH;;;;;;;;;;;;;;AAcG;;ACdH;;;;;;;;;;;;;;AAcG;AAIH,MAAM,uBAAuB,GAAG,CAAC,iBAAoC,KAAY;IAC/E,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC;AAC/C,IAAA,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM;IAExB,IAAI,IAAI,GAAG,CAAC;AAEZ,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;AAC5B,QAAA,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,GAAG,K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oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACnCD;;;;;;;;;;;;;;AAcG;;ACdH;;;;;;;;;;;;;;AAcG;AAEH;;AAEG;;AClBH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@valtimo/access-control",
3
- "version": "13.23.0",
3
+ "version": "13.24.1",
4
4
  "peerDependencies": {
5
- "@angular/common": "^19.2.8",
6
- "@angular/core": "^19.2.8"
5
+ "@angular/common": "19.2.20",
6
+ "@angular/core": "19.2.20"
7
7
  },
8
8
  "dependencies": {
9
9
  "jwt-decode": "4.0.0",