pigallery2-extension-kit 3.5.2 → 3.6.0-edge
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.
- package/README.md +11 -5
- package/index.d.ts +1 -0
- package/index.js +2 -3
- package/lib/backend/Logger.d.ts +7 -7
- package/lib/backend/Logger.js +104 -0
- package/lib/backend/ProjectPath.d.ts +12 -0
- package/lib/backend/ProjectPath.js +28 -2
- package/lib/backend/exceptions/DirectoryNotFound.d.ts +2 -0
- package/lib/backend/exceptions/DirectoryNotFound.js +7 -0
- package/lib/backend/exceptions/FileAlreadyExists.js +10 -0
- package/lib/backend/exceptions/FolderNotWritable.d.ts +2 -0
- package/lib/backend/exceptions/FolderNotWritable.js +7 -0
- package/lib/backend/exceptions/LocationLookupException.js +10 -0
- package/lib/backend/index.d.ts +1 -1
- package/lib/backend/middlewares/AlbumMWs.js +61 -0
- package/lib/backend/middlewares/GalleryMWs.d.ts +4 -0
- package/lib/backend/middlewares/GalleryMWs.js +380 -0
- package/lib/backend/middlewares/MetaFileMWs.js +41 -0
- package/lib/backend/middlewares/NotificationMWs.js +21 -0
- package/lib/backend/middlewares/PersonMWs.d.ts +1 -1
- package/lib/backend/middlewares/PersonMWs.js +64 -0
- package/lib/backend/middlewares/RenderingMWs.d.ts +24 -0
- package/lib/backend/middlewares/RenderingMWs.js +182 -0
- package/lib/backend/middlewares/RequestParams.d.ts +13 -0
- package/lib/backend/middlewares/RequestParams.js +25 -0
- package/lib/backend/middlewares/RequestSession.d.ts +9 -0
- package/lib/backend/middlewares/RequestSession.js +16 -0
- package/lib/backend/middlewares/ServerTimingMWs.d.ts +6 -6
- package/lib/backend/middlewares/ServerTimingMWs.js +108 -0
- package/lib/backend/middlewares/SharingMWs.d.ts +2 -1
- package/lib/backend/middlewares/SharingMWs.js +240 -0
- package/lib/backend/middlewares/UploadMWs.js +95 -0
- package/lib/backend/middlewares/VersionMWs.d.ts +1 -1
- package/lib/backend/middlewares/VersionMWs.js +41 -0
- package/lib/backend/middlewares/admin/AdminMWs.js +115 -0
- package/lib/backend/middlewares/admin/ExtensionMWs.js +85 -0
- package/lib/backend/middlewares/admin/SettingsMWs.js +54 -0
- package/lib/backend/middlewares/thumbnail/ThumbnailGeneratorMWs.d.ts +1 -1
- package/lib/backend/middlewares/thumbnail/ThumbnailGeneratorMWs.js +153 -0
- package/lib/backend/middlewares/user/AuthenticationMWs.d.ts +37 -0
- package/lib/backend/middlewares/user/AuthenticationMWs.js +346 -0
- package/lib/backend/middlewares/user/OIDCAuthService.d.ts +36 -5
- package/lib/backend/middlewares/user/OIDCAuthService.js +216 -0
- package/lib/backend/middlewares/user/OIDCMWs.d.ts +10 -0
- package/lib/backend/middlewares/user/OIDCMWs.js +30 -0
- package/lib/backend/middlewares/user/UserMWs.d.ts +1 -0
- package/lib/backend/middlewares/user/UserMWs.js +120 -0
- package/lib/backend/middlewares/user/UserRequestConstrainsMWs.d.ts +0 -1
- package/lib/backend/middlewares/user/UserRequestConstrainsMWs.js +29 -0
- package/lib/backend/model/DirectoryAccess.d.ts +78 -0
- package/lib/backend/model/DirectoryAccess.js +222 -0
- package/lib/backend/model/EventLoopHandler.d.ts +1 -1
- package/lib/backend/model/EventLoopHandler.js +24 -0
- package/lib/backend/model/FFmpeg.d.ts +47 -0
- package/lib/backend/model/FFmpeg.js +75 -0
- package/lib/backend/model/FFmpegFactory.d.ts +11 -2
- package/lib/backend/model/FFmpegFactory.js +28 -0
- package/lib/backend/model/Localizations.js +19 -0
- package/lib/backend/model/ObjectManagers.d.ts +1 -1
- package/lib/backend/model/ObjectManagers.js +253 -0
- package/lib/backend/model/PasswordHelper.d.ts +1 -1
- package/lib/backend/model/PasswordHelper.js +6 -2
- package/lib/backend/model/SessionContext.d.ts +16 -6
- package/lib/backend/model/SessionContext.js +11 -0
- package/lib/backend/model/UploadManager.d.ts +6 -3
- package/lib/backend/model/UploadManager.js +101 -0
- package/lib/backend/model/database/AlbumManager.js +122 -0
- package/lib/backend/model/database/CoverManager.d.ts +8 -2
- package/lib/backend/model/database/CoverManager.js +169 -0
- package/lib/backend/model/database/GalleryManager.d.ts +15 -9
- package/lib/backend/model/database/GalleryManager.js +363 -0
- package/lib/backend/model/database/IObjectManager.js +2 -0
- package/lib/backend/model/database/IndexingManager.d.ts +7 -7
- package/lib/backend/model/database/IndexingManager.js +452 -0
- package/lib/backend/model/database/LocationManager.d.ts +2 -3
- package/lib/backend/model/database/LocationManager.js +39 -0
- package/lib/backend/model/database/PersonManager.d.ts +5 -3
- package/lib/backend/model/database/PersonManager.js +248 -0
- package/lib/backend/model/database/ProjectedCacheManager.d.ts +9 -8
- package/lib/backend/model/database/ProjectedCacheManager.js +297 -0
- package/lib/backend/model/database/ProjectionAwareManager.d.ts +4 -4
- package/lib/backend/model/database/ProjectionAwareManager.js +56 -0
- package/lib/backend/model/database/SQLConnection.d.ts +4 -2
- package/lib/backend/model/database/SQLConnection.js +295 -0
- package/lib/backend/model/database/SearchManager.d.ts +23 -8
- package/lib/backend/model/database/SearchManager.js +1032 -0
- package/lib/backend/model/database/SessionManager.d.ts +41 -4
- package/lib/backend/model/database/SessionManager.js +228 -0
- package/lib/backend/model/database/SharingManager.d.ts +11 -6
- package/lib/backend/model/database/SharingManager.js +160 -0
- package/lib/backend/model/database/UserManager.d.ts +8 -1
- package/lib/backend/model/database/UserManager.js +148 -0
- package/lib/backend/model/database/VersionManager.js +60 -0
- package/lib/backend/model/database/enitites/DirectoryEntity.d.ts +1 -1
- package/lib/backend/model/database/enitites/DirectoryEntity.js +76 -0
- package/lib/backend/model/database/enitites/EntityUtils.d.ts +22 -1
- package/lib/backend/model/database/enitites/EntityUtils.js +66 -0
- package/lib/backend/model/database/enitites/FileEntity.js +31 -0
- package/lib/backend/model/database/enitites/MDFileEntity.js +21 -0
- package/lib/backend/model/database/enitites/MediaEntity.d.ts +5 -2
- package/lib/backend/model/database/enitites/MediaEntity.js +223 -0
- package/lib/backend/model/database/enitites/PhotoEntity.js +19 -0
- package/lib/backend/model/database/enitites/ProjectedDirectoryCacheEntity.d.ts +2 -2
- package/lib/backend/model/database/enitites/ProjectedDirectoryCacheEntity.js +61 -0
- package/lib/backend/model/database/enitites/SharingEntity.d.ts +11 -5
- package/lib/backend/model/database/enitites/SharingEntity.js +100 -0
- package/lib/backend/model/database/enitites/UserEntity.d.ts +8 -5
- package/lib/backend/model/database/enitites/UserEntity.js +97 -0
- package/lib/backend/model/database/enitites/VersionEntity.js +19 -0
- package/lib/backend/model/database/enitites/VideoEntity.d.ts +2 -2
- package/lib/backend/model/database/enitites/VideoEntity.js +38 -0
- package/lib/backend/model/database/enitites/album/AlbumBaseEntity.js +32 -0
- package/lib/backend/model/database/enitites/album/ProjectedAlbumCacheEntity.d.ts +2 -2
- package/lib/backend/model/database/enitites/album/ProjectedAlbumCacheEntity.js +52 -0
- package/lib/backend/model/database/enitites/album/SavedSearchEntity.js +29 -0
- package/lib/backend/model/database/enitites/person/PersonEntry.js +36 -0
- package/lib/backend/model/database/enitites/person/PersonJunctionTable.js +37 -0
- package/lib/backend/model/database/enitites/person/ProjectedPersonCacheEntity.d.ts +1 -1
- package/lib/backend/model/database/enitites/person/ProjectedPersonCacheEntity.js +49 -0
- package/lib/backend/model/diagnostics/ConfigDiagnostics.d.ts +31 -12
- package/lib/backend/model/diagnostics/ConfigDiagnostics.js +537 -0
- package/lib/backend/model/extension/ExpressRouterWrapper.d.ts +10 -4
- package/lib/backend/model/extension/ExpressRouterWrapper.js +113 -0
- package/lib/backend/model/extension/ExtensionApp.d.ts +2 -3
- package/lib/backend/model/extension/ExtensionApp.js +18 -0
- package/lib/backend/model/extension/ExtensionConfig.js +17 -0
- package/lib/backend/model/extension/ExtensionConfigTemplateLoader.js +4 -3
- package/lib/backend/model/extension/ExtensionConfigWrapper.js +6 -5
- package/lib/backend/model/extension/ExtensionDB.d.ts +2 -2
- package/lib/backend/model/extension/ExtensionDB.js +22 -0
- package/lib/backend/model/extension/ExtensionDecorator.js +33 -0
- package/lib/backend/model/extension/ExtensionEvent.d.ts +12 -1
- package/lib/backend/model/extension/ExtensionEvent.js +81 -0
- package/lib/backend/model/extension/ExtensionManager.d.ts +22 -4
- package/lib/backend/model/extension/ExtensionManager.js +424 -0
- package/lib/backend/model/extension/ExtensionMessengerHandler.js +28 -0
- package/lib/backend/model/extension/ExtensionObject.d.ts +6 -3
- package/lib/backend/model/extension/ExtensionObject.js +45 -0
- package/lib/backend/model/extension/ExtensionRepository.js +69 -0
- package/lib/backend/model/extension/IExtension.d.ts +35 -18
- package/lib/backend/model/extension/IExtension.js +2 -0
- package/lib/backend/model/extension/UIExtension.js +23 -0
- package/lib/backend/model/fileaccess/DiskManager.d.ts +3 -1
- package/lib/backend/model/fileaccess/DiskManager.js +313 -0
- package/lib/backend/model/fileaccess/MetadataCreationDate.js +27 -0
- package/lib/backend/model/fileaccess/MetadataLoader.d.ts +17 -0
- package/lib/backend/model/fileaccess/MetadataLoader.js +765 -0
- package/lib/backend/model/fileaccess/PhotoWorker.js +159 -0
- package/lib/backend/model/fileaccess/TaskExecuter.js +41 -0
- package/lib/backend/model/fileaccess/TaskQue.d.ts +4 -4
- package/lib/backend/model/fileaccess/TaskQue.js +50 -0
- package/lib/backend/model/fileaccess/VideoConverterWorker.d.ts +4 -1
- package/lib/backend/model/fileaccess/VideoConverterWorker.js +59 -0
- package/lib/backend/model/fileaccess/fileprocessing/GPXProcessing.js +136 -0
- package/lib/backend/model/fileaccess/fileprocessing/PhotoProcessing.d.ts +3 -2
- package/lib/backend/model/fileaccess/fileprocessing/PhotoProcessing.js +251 -0
- package/lib/backend/model/fileaccess/fileprocessing/VideoProcessing.js +97 -0
- package/lib/backend/model/jobs/JobManager.d.ts +2 -4
- package/lib/backend/model/jobs/JobManager.js +129 -0
- package/lib/backend/model/jobs/JobProgressManager.d.ts +5 -3
- package/lib/backend/model/jobs/JobProgressManager.js +94 -0
- package/lib/backend/model/jobs/JobRepository.d.ts +1 -3
- package/lib/backend/model/jobs/JobRepository.js +50 -0
- package/lib/backend/model/jobs/jobs/AlbumCoverFillingJob.d.ts +1 -1
- package/lib/backend/model/jobs/jobs/AlbumCoverFillingJob.js +91 -0
- package/lib/backend/model/jobs/jobs/AlbumCoverResetJob.js +32 -0
- package/lib/backend/model/jobs/jobs/AlbumResetJob.js +30 -0
- package/lib/backend/model/jobs/jobs/FileJob.js +243 -0
- package/lib/backend/model/jobs/jobs/GPXCompressionJob.js +35 -0
- package/lib/backend/model/jobs/jobs/GPXCompressionResetJob.js +23 -0
- package/lib/backend/model/jobs/jobs/GalleryResetJob.js +30 -0
- package/lib/backend/model/jobs/jobs/IJob.js +2 -0
- package/lib/backend/model/jobs/jobs/IJobListener.d.ts +2 -2
- package/lib/backend/model/jobs/jobs/IJobListener.js +2 -0
- package/lib/backend/model/jobs/jobs/IndexingJob.js +99 -0
- package/lib/backend/model/jobs/jobs/Job.d.ts +4 -1
- package/lib/backend/model/jobs/jobs/Job.js +135 -0
- package/lib/backend/model/jobs/jobs/JobProgress.js +100 -0
- package/lib/backend/model/jobs/jobs/PhotoConvertingJob.js +78 -0
- package/lib/backend/model/jobs/jobs/TempFolderCleaningJob.js +122 -0
- package/lib/backend/model/jobs/jobs/TopPickSendJob.js +113 -0
- package/lib/backend/model/jobs/jobs/VideoConvertingJob.js +31 -0
- package/lib/backend/model/messenger/EmailMessenger.d.ts +1 -1
- package/lib/backend/model/messenger/EmailMessenger.js +87 -0
- package/lib/backend/model/messenger/ExtensionMessenger.js +16 -0
- package/lib/backend/model/messenger/Messenger.d.ts +1 -2
- package/lib/backend/model/messenger/Messenger.js +36 -0
- package/lib/backend/model/messenger/MessengerRepository.d.ts +1 -3
- package/lib/backend/model/messenger/MessengerRepository.js +38 -0
- package/lib/backend/model/messenger/StdoutMessenger.js +16 -0
- package/lib/backend/routes/AlbumRouter.js +39 -0
- package/lib/backend/routes/ErrorRouter.d.ts +1 -0
- package/lib/backend/routes/ErrorRouter.js +39 -0
- package/lib/backend/routes/GalleryRouter.d.ts +8 -0
- package/lib/backend/routes/GalleryRouter.js +165 -0
- package/lib/backend/routes/LoggerRouter.js +43 -0
- package/lib/backend/routes/NotificationRouter.js +19 -0
- package/lib/backend/routes/OIDCRouter.js +20 -0
- package/lib/backend/routes/PersonRouter.js +41 -0
- package/lib/backend/routes/PublicRouter.d.ts +3 -6
- package/lib/backend/routes/PublicRouter.js +301 -0
- package/lib/backend/routes/Router.js +36 -0
- package/lib/backend/routes/SharingRouter.d.ts +1 -1
- package/lib/backend/routes/SharingRouter.js +55 -0
- package/lib/backend/routes/UploadRouter.js +18 -0
- package/lib/backend/routes/UserRouter.d.ts +1 -0
- package/lib/backend/routes/UserRouter.js +53 -0
- package/lib/backend/routes/admin/AdminRouter.js +32 -0
- package/lib/backend/routes/admin/ExtensionRouter.js +30 -0
- package/lib/backend/routes/admin/SettingsRouter.js +18 -0
- package/lib/backend/server.d.ts +3 -3
- package/lib/backend/server.js +176 -0
- package/lib/common/CookieNames.js +10 -0
- package/lib/common/CustomHeaders.js +8 -0
- package/lib/common/DataStructureVersion.d.ts +1 -1
- package/lib/common/DataStructureVersion.js +7 -0
- package/lib/common/PG2ConfMap.js +36 -0
- package/lib/common/QueryParams.js +45 -0
- package/lib/common/SearchQueryParser.d.ts +2 -2
- package/lib/common/SearchQueryParser.js +611 -0
- package/lib/common/SearchQueryUtils.d.ts +71 -4
- package/lib/common/SearchQueryUtils.js +443 -0
- package/lib/common/SupportedFormats.d.ts +11 -1
- package/lib/common/SupportedFormats.js +13 -19
- package/lib/common/TextFold.d.ts +6 -0
- package/lib/common/TextFold.js +19 -0
- package/lib/common/UploadUtils.d.ts +4 -0
- package/lib/common/UploadUtils.js +20 -0
- package/lib/common/Utils.d.ts +23 -24
- package/lib/common/Utils.js +37 -97
- package/lib/common/config/private/Config.d.ts +1 -1
- package/lib/common/config/private/Config.js +2 -0
- package/lib/common/config/private/PrivateConfig.d.ts +17 -4
- package/lib/common/config/private/PrivateConfig.js +262 -33
- package/lib/common/config/private/PrivateConfigClass.js +10 -13
- package/lib/common/config/private/WebConfig.d.ts +1 -2
- package/lib/common/config/private/WebConfig.js +0 -2
- package/lib/common/config/private/subconfigs/MessagingConfig.js +8 -0
- package/lib/common/config/private/subconfigs/ServerExtensionsConfig.d.ts +2 -3
- package/lib/common/config/private/subconfigs/ServerExtensionsConfig.js +7 -3
- package/lib/common/config/public/ClientConfig.d.ts +55 -17
- package/lib/common/config/public/ClientConfig.js +291 -20
- package/lib/common/config/public/Config.js +5 -4
- package/lib/common/entities/AutoCompleteItem.d.ts +3 -3
- package/lib/common/entities/ContentWrapper.d.ts +21 -8
- package/lib/common/entities/ContentWrapper.js +286 -318
- package/lib/common/entities/DirectoryDTO.d.ts +7 -6
- package/lib/common/entities/DirectoryDTO.js +10 -5
- package/lib/common/entities/Error.d.ts +12 -7
- package/lib/common/entities/Error.js +15 -3
- package/lib/common/entities/MediaDTO.d.ts +13 -0
- package/lib/common/entities/MediaDTO.js +10 -7
- package/lib/common/entities/Message.d.ts +3 -3
- package/lib/common/entities/NotificationDTO.d.ts +2 -2
- package/lib/common/entities/SearchQueryDTO.d.ts +9 -1
- package/lib/common/entities/SearchQueryDTO.js +1 -0
- package/lib/common/entities/SharingDTO.d.ts +39 -5
- package/lib/common/entities/SortingMethods.d.ts +26 -2
- package/lib/common/entities/SortingMethods.js +14 -1
- package/lib/common/entities/UserDTO.d.ts +5 -2
- package/lib/common/entities/UserSettingsDTO.d.ts +3 -1
- package/lib/common/entities/VideoDTO.d.ts +2 -5
- package/lib/common/entities/album/AlbumBaseDTO.d.ts +2 -2
- package/lib/common/entities/extension/ExtensionListItem.d.ts +1 -1
- package/lib/common/entities/extension/IClientUIConfig.d.ts +19 -12
- package/lib/common/entities/job/JobDTO.d.ts +1 -1
- package/lib/common/entities/job/JobProgressDTO.d.ts +1 -1
- package/lib/common/entities/job/JobScheduleDTO.d.ts +5 -5
- package/lib/common/entities/job/JobScheduleDTO.js +9 -5
- package/lib/common/event/Event.js +49 -0
- package/lib/common/event/EventLimit.d.ts +1 -1
- package/package.json +21 -8
- package/REPOSITORY.md +0 -13
- package/events.drawio +0 -1
- package/events.png +0 -0
- package/index.js.map +0 -1
- package/index.ts +0 -2
- package/lib/backend/model/database/enitites/PersonEntry.d.ts +0 -11
- package/lib/backend/model/database/enitites/PersonJunctionTable.d.ts +0 -10
- package/lib/common/entities/ConentWrapper.d.ts +0 -18
- package/lib/common/entities/ConentWrapper.js +0 -490
- package/lib/frontend/app/app.component.d.ts +0 -18
- package/lib/frontend/app/app.module.d.ts +0 -23
- package/lib/frontend/app/app.routing.d.ts +0 -4
- package/lib/frontend/app/icon.component.d.ts +0 -7
- package/lib/frontend/app/model/IRenderable.d.ts +0 -17
- package/lib/frontend/app/model/backendtext.service.d.ts +0 -7
- package/lib/frontend/app/model/backendtext.service.spec.d.ts +0 -1
- package/lib/frontend/app/model/extension.service.d.ts +0 -5
- package/lib/frontend/app/model/navigation.service.d.ts +0 -12
- package/lib/frontend/app/model/network/autehentication.service.spec.d.ts +0 -1
- package/lib/frontend/app/model/network/authentication.service.d.ts +0 -22
- package/lib/frontend/app/model/network/helper/auth.guard.d.ts +0 -9
- package/lib/frontend/app/model/network/helper/csrf.interceptor.d.ts +0 -8
- package/lib/frontend/app/model/network/helper/error.interceptor.d.ts +0 -8
- package/lib/frontend/app/model/network/network.service.d.ts +0 -29
- package/lib/frontend/app/model/network/network.service.spec.d.ts +0 -1
- package/lib/frontend/app/model/network/user.service.d.ts +0 -13
- package/lib/frontend/app/model/network/user.service.spec.d.ts +0 -1
- package/lib/frontend/app/model/notification.service.d.ts +0 -28
- package/lib/frontend/app/model/page.helper.d.ts +0 -15
- package/lib/frontend/app/model/pi-title.service.d.ts +0 -15
- package/lib/frontend/app/model/query.service.d.ts +0 -19
- package/lib/frontend/app/model/seededRandom.service.d.ts +0 -7
- package/lib/frontend/app/model/theme.service.d.ts +0 -16
- package/lib/frontend/app/model/version.service.d.ts +0 -10
- package/lib/frontend/app/pipes/DurationPipe.d.ts +0 -4
- package/lib/frontend/app/pipes/FileDTOToPathPipe.d.ts +0 -5
- package/lib/frontend/app/pipes/FileDTOToRelativePathPipe.d.ts +0 -5
- package/lib/frontend/app/pipes/FileSizePipe.d.ts +0 -4
- package/lib/frontend/app/pipes/GPXFilesFilterPipe.d.ts +0 -5
- package/lib/frontend/app/pipes/MDFilesFilterPipe.d.ts +0 -6
- package/lib/frontend/app/pipes/ParseIntPipe.d.ts +0 -4
- package/lib/frontend/app/pipes/PhotoFilterPipe.d.ts +0 -6
- package/lib/frontend/app/pipes/SafeHTMLPipe.d.ts +0 -7
- package/lib/frontend/app/pipes/StringifyEnum.d.ts +0 -4
- package/lib/frontend/app/pipes/StringifyGridSize.d.ts +0 -5
- package/lib/frontend/app/pipes/StringifyRolePipe.d.ts +0 -4
- package/lib/frontend/app/pipes/StringifySearchQuery.d.ts +0 -8
- package/lib/frontend/app/pipes/StringifySearchType.d.ts +0 -5
- package/lib/frontend/app/pipes/StringifySortingMethod.d.ts +0 -4
- package/lib/frontend/app/ui/EnumTranslations.d.ts +0 -5
- package/lib/frontend/app/ui/admin/admin.component.d.ts +0 -36
- package/lib/frontend/app/ui/albums/album/album.component.d.ts +0 -26
- package/lib/frontend/app/ui/albums/albums.component.d.ts +0 -31
- package/lib/frontend/app/ui/albums/albums.service.d.ts +0 -12
- package/lib/frontend/app/ui/albums/saved-search-popup/saved-search-popup.component.d.ts +0 -15
- package/lib/frontend/app/ui/duplicates/duplicates.component.d.ts +0 -36
- package/lib/frontend/app/ui/duplicates/duplicates.service.d.ts +0 -9
- package/lib/frontend/app/ui/duplicates/photo/photo.duplicates.component.d.ts +0 -11
- package/lib/frontend/app/ui/faces/Person.d.ts +0 -9
- package/lib/frontend/app/ui/faces/face/face.component.d.ts +0 -22
- package/lib/frontend/app/ui/faces/faces.component.d.ts +0 -18
- package/lib/frontend/app/ui/faces/faces.service.d.ts +0 -14
- package/lib/frontend/app/ui/faces/navigator/navigator.faces.component.d.ts +0 -15
- package/lib/frontend/app/ui/frame/frame.component.d.ts +0 -60
- package/lib/frontend/app/ui/gallery/Media.d.ts +0 -15
- package/lib/frontend/app/ui/gallery/MediaIcon.d.ts +0 -29
- package/lib/frontend/app/ui/gallery/blog/blog.gallery.component.d.ts +0 -16
- package/lib/frontend/app/ui/gallery/blog/blog.service.d.ts +0 -85
- package/lib/frontend/app/ui/gallery/blog/blog.service.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/cache.gallery.service.d.ts +0 -51
- package/lib/frontend/app/ui/gallery/content.service.d.ts +0 -11
- package/lib/frontend/app/ui/gallery/contentLoader.service.d.ts +0 -37
- package/lib/frontend/app/ui/gallery/directories/directories.component.d.ts +0 -14
- package/lib/frontend/app/ui/gallery/directories/directory/directory.gallery.component.d.ts +0 -20
- package/lib/frontend/app/ui/gallery/filter/filter.gallery.component.d.ts +0 -32
- package/lib/frontend/app/ui/gallery/filter/filter.service.d.ts +0 -51
- package/lib/frontend/app/ui/gallery/filter/filter.service.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/fullscreen.service.d.ts +0 -7
- package/lib/frontend/app/ui/gallery/gallery.component.d.ts +0 -64
- package/lib/frontend/app/ui/gallery/gallery.component.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/gallery.service.d.ts +0 -13
- package/lib/frontend/app/ui/gallery/grid/GridMedia.d.ts +0 -13
- package/lib/frontend/app/ui/gallery/grid/GridRowBuilder.d.ts +0 -16
- package/lib/frontend/app/ui/gallery/grid/grid.gallery.component.d.ts +0 -88
- package/lib/frontend/app/ui/gallery/grid/grid.gallery.component.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/grid/photo/loading/loading.photo.grid.gallery.component.d.ts +0 -4
- package/lib/frontend/app/ui/gallery/grid/photo/media-button-modal/media-button-modal.component.d.ts +0 -20
- package/lib/frontend/app/ui/gallery/grid/photo/media-button-modal/media-button-modal.service.d.ts +0 -27
- package/lib/frontend/app/ui/gallery/grid/photo/photo.grid.gallery.component.d.ts +0 -53
- package/lib/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.d.ts +0 -103
- package/lib/frontend/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.d.ts +0 -51
- package/lib/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.d.ts +0 -95
- package/lib/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/lightbox/lightbox.service.d.ts +0 -45
- package/lib/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.d.ts +0 -71
- package/lib/frontend/app/ui/gallery/map/MarkerFactory.d.ts +0 -12
- package/lib/frontend/app/ui/gallery/map/lightbox/lightbox.map.gallery.component.d.ts +0 -80
- package/lib/frontend/app/ui/gallery/map/map.gallery.component.d.ts +0 -36
- package/lib/frontend/app/ui/gallery/map/map.service.d.ts +0 -30
- package/lib/frontend/app/ui/gallery/navigator/navigator.gallery.component.d.ts +0 -81
- package/lib/frontend/app/ui/gallery/navigator/navigator.service.d.ts +0 -14
- package/lib/frontend/app/ui/gallery/navigator/sorting.service.d.ts +0 -38
- package/lib/frontend/app/ui/gallery/overlay.service.d.ts +0 -9
- package/lib/frontend/app/ui/gallery/photo-frame-builder/photo-frame-builder.gallery.component.d.ts +0 -40
- package/lib/frontend/app/ui/gallery/random-query-builder/random-query-builder.gallery.component.d.ts +0 -30
- package/lib/frontend/app/ui/gallery/search/AutoCompleteRenderItem.d.ts +0 -11
- package/lib/frontend/app/ui/gallery/search/autocomplete.service.d.ts +0 -33
- package/lib/frontend/app/ui/gallery/search/query-builder/query-bulder.gallery.component.d.ts +0 -22
- package/lib/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.d.ts +0 -43
- package/lib/frontend/app/ui/gallery/search/search-field/search-field.gallery.component.d.ts +0 -31
- package/lib/frontend/app/ui/gallery/search/search-field-base/search-field-base.gallery.component.d.ts +0 -57
- package/lib/frontend/app/ui/gallery/search/search-query-parser.service.d.ts +0 -7
- package/lib/frontend/app/ui/gallery/search/search.gallery.component.d.ts +0 -39
- package/lib/frontend/app/ui/gallery/share/share.gallery.component.d.ts +0 -67
- package/lib/frontend/app/ui/gallery/share.service.d.ts +0 -35
- package/lib/frontend/app/ui/gallery/thumbnailLoader.service.d.ts +0 -41
- package/lib/frontend/app/ui/gallery/thumbnailManager.service.d.ts +0 -46
- package/lib/frontend/app/ui/gallery/uploader/uploader.gallery.component.d.ts +0 -15
- package/lib/frontend/app/ui/gallery/uploader/uploader.service.d.ts +0 -36
- package/lib/frontend/app/ui/gallery/wakelock.service.d.ts +0 -19
- package/lib/frontend/app/ui/language/language.component.d.ts +0 -10
- package/lib/frontend/app/ui/login/login.component.d.ts +0 -18
- package/lib/frontend/app/ui/settings/extension-installer/extension-installer.component.d.ts +0 -18
- package/lib/frontend/app/ui/settings/extension-installer/extension-installer.service.d.ts +0 -10
- package/lib/frontend/app/ui/settings/gallery-statistic/gallery-statistic.component.d.ts +0 -5
- package/lib/frontend/app/ui/settings/scheduled-jobs.service.d.ts +0 -41
- package/lib/frontend/app/ui/settings/settings.service.d.ts +0 -27
- package/lib/frontend/app/ui/settings/sharings-list/sharings-list.component.d.ts +0 -14
- package/lib/frontend/app/ui/settings/template/CustomSettingsEntries.d.ts +0 -57
- package/lib/frontend/app/ui/settings/template/ISettingsComponent.d.ts +0 -13
- package/lib/frontend/app/ui/settings/template/settings-entry/settings-entry.component.d.ts +0 -118
- package/lib/frontend/app/ui/settings/template/settings-entry/sorting-method/sorting-method.settings-entry.component.d.ts +0 -28
- package/lib/frontend/app/ui/settings/template/template.component.d.ts +0 -97
- package/lib/frontend/app/ui/settings/users/users.component.d.ts +0 -47
- package/lib/frontend/app/ui/settings/users/users.service.d.ts +0 -12
- package/lib/frontend/app/ui/settings/workflow/button/job-button.settings.component.d.ts +0 -32
- package/lib/frontend/app/ui/settings/workflow/progress/job-progress.settings.component.d.ts +0 -25
- package/lib/frontend/app/ui/settings/workflow/workflow.component.d.ts +0 -68
- package/lib/frontend/app/ui/sharelogin/share-login.component.d.ts +0 -16
- package/lib/frontend/app/ui/utils/grid-size-icon/grid-size-icon.component.d.ts +0 -5
- package/lib/frontend/app/ui/utils/sorting-method-icon/sorting-method-icon.component.d.ts +0 -13
- package/lib/frontend/app/ui/utils/timestamp-datepicker/datepicker.component.d.ts +0 -10
- package/lib/frontend/app/ui/utils/timestamp-timepicker/timepicker.component.d.ts +0 -11
- package/lib/frontend/environments/environment.d.ts +0 -3
- package/lib/frontend/environments/environment.prod.d.ts +0 -3
- package/lib/frontend/main.d.ts +0 -21
- package/lib/frontend/polyfills.d.ts +0 -60
- package/lib/frontend/test.d.ts +0 -1
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthenticationMWs = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const Error_1 = require("../../../common/entities/Error");
|
|
6
|
+
const ObjectManagers_1 = require("../../model/ObjectManagers");
|
|
7
|
+
const Config_1 = require("../../../common/config/private/Config");
|
|
8
|
+
const PasswordHelper_1 = require("../../model/PasswordHelper");
|
|
9
|
+
const Utils_1 = require("../../../common/Utils");
|
|
10
|
+
const QueryParams_1 = require("../../../common/QueryParams");
|
|
11
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
12
|
+
const Logger_1 = require("../../Logger");
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const DirectoryAccess_1 = require("../../model/DirectoryAccess");
|
|
15
|
+
const OIDCAuthService_1 = require("./OIDCAuthService");
|
|
16
|
+
const RequestParams_1 = require("../RequestParams");
|
|
17
|
+
const RequestSession_1 = require("../RequestSession");
|
|
18
|
+
const LOG_TAG = 'AuthenticationMWs';
|
|
19
|
+
class AuthenticationMWs {
|
|
20
|
+
static async tryAuthenticate(req, res, next) {
|
|
21
|
+
if (Config_1.Config.Users.authenticationRequired === false) {
|
|
22
|
+
const user = ObjectManagers_1.ObjectManagers.getInstance().UserManager.getUnAuthenticatedUser();
|
|
23
|
+
req.session.context = await ObjectManagers_1.ObjectManagers.getInstance().SessionManager.buildContext(user);
|
|
24
|
+
return next();
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
// the page rendering uses the session user too
|
|
28
|
+
await AuthenticationMWs.restoreSession(req);
|
|
29
|
+
const user = await AuthenticationMWs.getSharingUser(req);
|
|
30
|
+
if (user) {
|
|
31
|
+
await AuthenticationMWs.startSession(req, user);
|
|
32
|
+
}
|
|
33
|
+
// eslint-disable-next-line no-empty
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
}
|
|
37
|
+
return next();
|
|
38
|
+
}
|
|
39
|
+
static async authenticate(req, res, next) {
|
|
40
|
+
if (Config_1.Config.Users.authenticationRequired === false) {
|
|
41
|
+
const user = ObjectManagers_1.ObjectManagers.getInstance().UserManager.getUnAuthenticatedUser();
|
|
42
|
+
req.session.context = await ObjectManagers_1.ObjectManagers.getInstance().SessionManager.buildContext(user);
|
|
43
|
+
return next();
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
// if already authenticated, do not try to use sharing authentication
|
|
47
|
+
if (await AuthenticationMWs.restoreSession(req)) {
|
|
48
|
+
return next();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.INTERNAL, null, err));
|
|
53
|
+
}
|
|
54
|
+
let user;
|
|
55
|
+
try {
|
|
56
|
+
user = await AuthenticationMWs.getSharingUser(req);
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
// no sharing user, handled below
|
|
60
|
+
}
|
|
61
|
+
// no sharing user yet (eg.: its password protected)
|
|
62
|
+
if (!user) {
|
|
63
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.NOT_AUTHENTICATED_SHARING, 'Not authenticated sharing'));
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
await AuthenticationMWs.startSession(req, user);
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.INTERNAL, null, err));
|
|
70
|
+
}
|
|
71
|
+
return next();
|
|
72
|
+
}
|
|
73
|
+
static normalizePathParam(paramName) {
|
|
74
|
+
return function normalizePathParam(req, res, next) {
|
|
75
|
+
const p = path.normalize(RequestParams_1.RequestParams.get(req, paramName) || path.sep);
|
|
76
|
+
// normalize() resolves inner '..' segments, only a leading one can escape the base folder
|
|
77
|
+
if (p === '..' || p.startsWith('..' + path.sep)) {
|
|
78
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.INPUT_ERROR, 'Invalid path'));
|
|
79
|
+
}
|
|
80
|
+
req.params[paramName] = p;
|
|
81
|
+
return next();
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
static authoriseMetaFiles(paramName) {
|
|
85
|
+
return async function authoriseMetaFiles(req, res, next) {
|
|
86
|
+
try {
|
|
87
|
+
const p = RequestParams_1.RequestParams.getRequired(req, paramName);
|
|
88
|
+
if (!await ObjectManagers_1.ObjectManagers.getInstance().GalleryManager.authoriseMetaFile(RequestSession_1.RequestSession.getContext(req), p)) {
|
|
89
|
+
res.sendStatus(404); // same as not existing
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
return next();
|
|
93
|
+
}
|
|
94
|
+
catch (e) {
|
|
95
|
+
// On error, fail closed to be safe
|
|
96
|
+
Logger_1.Logger.warn(LOG_TAG, 'authoriseMetaFiles error:', e);
|
|
97
|
+
res.sendStatus(404); // same as not existing
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Authorises the directory against the directory allow and block lists of the session (see DirectoryAccess).
|
|
104
|
+
* Not available directories get the same error as not existing ones, so it can't be used to find out if a directory exists.
|
|
105
|
+
* It sets req.directoryAccess for the next middlewares.
|
|
106
|
+
*/
|
|
107
|
+
static authoriseDirectory(paramName) {
|
|
108
|
+
return async function authoriseDirectory(req, res, next) {
|
|
109
|
+
try {
|
|
110
|
+
const dirRelPath = RequestParams_1.RequestParams.get(req, paramName) || path.sep;
|
|
111
|
+
const access = req.session.context?.directoryAccess
|
|
112
|
+
? await req.session.context.directoryAccess.getAccess(dirRelPath)
|
|
113
|
+
: DirectoryAccess_1.DirectoryAccessTypes.none;
|
|
114
|
+
if (access === DirectoryAccess_1.DirectoryAccessTypes.none) {
|
|
115
|
+
return AuthenticationMWs.directoryNotFound(next);
|
|
116
|
+
}
|
|
117
|
+
req.directoryAccess = access;
|
|
118
|
+
return next();
|
|
119
|
+
}
|
|
120
|
+
catch (e) {
|
|
121
|
+
// On error, fail closed to be safe
|
|
122
|
+
Logger_1.Logger.warn(LOG_TAG, 'authoriseDirectory error:', e);
|
|
123
|
+
return AuthenticationMWs.directoryNotFound(next);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The response for not existing and not available directories. They need to be the same:
|
|
129
|
+
* GalleryMWs.listDirectory answers not existing directories with the same status and error.
|
|
130
|
+
*/
|
|
131
|
+
static directoryNotFound(next) {
|
|
132
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.DIRECTORY_NOT_FOUND, 'Directory not found'));
|
|
133
|
+
}
|
|
134
|
+
static authoriseMedia(paramName) {
|
|
135
|
+
return async function authoriseMedia(req, res, next) {
|
|
136
|
+
try {
|
|
137
|
+
const mediaRelPath = RequestParams_1.RequestParams.getRequired(req, paramName);
|
|
138
|
+
if (!await ObjectManagers_1.ObjectManagers.getInstance().GalleryManager.authoriseMedia(RequestSession_1.RequestSession.getContext(req), mediaRelPath)) {
|
|
139
|
+
res.sendStatus(404); // same as a not existing media, so it can't be used to probe paths
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
return next();
|
|
143
|
+
}
|
|
144
|
+
catch (e) {
|
|
145
|
+
// On error, fail closed to be safe
|
|
146
|
+
Logger_1.Logger.warn(LOG_TAG, 'authoriseMedia error:', e);
|
|
147
|
+
res.sendStatus(404); // same as a not existing media, so it can't be used to probe paths
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
static authorise(role) {
|
|
153
|
+
return function authorise(req, res, next) {
|
|
154
|
+
// fail closed: a request without session is not authorised
|
|
155
|
+
const userRole = req.session.context?.user.role;
|
|
156
|
+
if (userRole === undefined || userRole < role) {
|
|
157
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.NOT_AUTHORISED));
|
|
158
|
+
}
|
|
159
|
+
return next();
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
static async shareLogin(req, res, next) {
|
|
163
|
+
if (Config_1.Config.Sharing.enabled === false) {
|
|
164
|
+
return next();
|
|
165
|
+
}
|
|
166
|
+
const sharingKey = AuthenticationMWs.getSharingKey(req);
|
|
167
|
+
// not enough parameter
|
|
168
|
+
if (!sharingKey) {
|
|
169
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.INPUT_ERROR, 'no sharing key provided'));
|
|
170
|
+
}
|
|
171
|
+
try {
|
|
172
|
+
const body = req.body;
|
|
173
|
+
const password = (body ? body.password : null) || null;
|
|
174
|
+
const sharing = await ObjectManagers_1.ObjectManagers.getInstance().SharingManager.findOne(sharingKey);
|
|
175
|
+
if (!sharing ||
|
|
176
|
+
sharing.expires < Date.now() ||
|
|
177
|
+
((Config_1.Config.Sharing.passwordRequired === true ||
|
|
178
|
+
sharing.password) &&
|
|
179
|
+
!PasswordHelper_1.PasswordHelper.comparePassword(password, sharing.password))) {
|
|
180
|
+
Logger_1.Logger.warn(LOG_TAG, 'Failed login from IP `' + req.ip + '` with sharing:' + sharingKey + ', bad password');
|
|
181
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.CREDENTIAL_NOT_FOUND));
|
|
182
|
+
}
|
|
183
|
+
await AuthenticationMWs.startSession(req, ObjectManagers_1.ObjectManagers.getInstance().SessionManager.createSharingUser(sharing));
|
|
184
|
+
return next();
|
|
185
|
+
}
|
|
186
|
+
catch (err) {
|
|
187
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.GENERAL_ERROR, null, err));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
static inverseAuthenticate(req, res, next) {
|
|
191
|
+
if (typeof req.session.context?.user !== 'undefined') {
|
|
192
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.ALREADY_AUTHENTICATED));
|
|
193
|
+
}
|
|
194
|
+
return next();
|
|
195
|
+
}
|
|
196
|
+
static async login(req, res, next) {
|
|
197
|
+
if (Config_1.Config.Users.authenticationRequired === false) {
|
|
198
|
+
return res.sendStatus(404);
|
|
199
|
+
}
|
|
200
|
+
// not enough parameters
|
|
201
|
+
const body = req.body;
|
|
202
|
+
if (typeof body === 'undefined' ||
|
|
203
|
+
typeof body.loginCredential === 'undefined' ||
|
|
204
|
+
typeof body.loginCredential.username !== 'string' ||
|
|
205
|
+
typeof body.loginCredential.password !== 'string' ||
|
|
206
|
+
body.loginCredential.username.length === 0 ||
|
|
207
|
+
body.loginCredential.password.length === 0) {
|
|
208
|
+
Logger_1.Logger.warn(LOG_TAG, 'Failed login from IP `' + req.ip + '` no user or password provided');
|
|
209
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.INPUT_ERROR, 'not all parameters are included for loginCredential'));
|
|
210
|
+
}
|
|
211
|
+
const credential = body.loginCredential;
|
|
212
|
+
try {
|
|
213
|
+
// let's find the user
|
|
214
|
+
const user = await ObjectManagers_1.ObjectManagers.getInstance().UserManager.findOne({
|
|
215
|
+
name: credential.username,
|
|
216
|
+
password: credential.password,
|
|
217
|
+
});
|
|
218
|
+
if (!user) {
|
|
219
|
+
throw new Error('No entry found');
|
|
220
|
+
}
|
|
221
|
+
await AuthenticationMWs.startSession(req, user, credential.rememberMe);
|
|
222
|
+
return next();
|
|
223
|
+
}
|
|
224
|
+
catch (err) {
|
|
225
|
+
Logger_1.Logger.warn(LOG_TAG, 'Failed login from IP `' + req.ip + '` for user:' + credential.username
|
|
226
|
+
+ ', bad password');
|
|
227
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.CREDENTIAL_NOT_FOUND, 'credentials not found during login', err));
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
static async oidcLogin(req, res, next) {
|
|
231
|
+
try {
|
|
232
|
+
const user = await OIDCAuthService_1.OIDCAuthService.getUserFromAuthenticationResponse(req);
|
|
233
|
+
await AuthenticationMWs.startSession(req, user, true);
|
|
234
|
+
return next();
|
|
235
|
+
}
|
|
236
|
+
catch (err) {
|
|
237
|
+
return next(err);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Starts the session again from the current DB row of its user,
|
|
242
|
+
* so changing the own user (e.g.: the password) does not end the session. Use it after user changes.
|
|
243
|
+
*/
|
|
244
|
+
static async refreshSession(req, res, next) {
|
|
245
|
+
const id = req.session.context?.user?.id;
|
|
246
|
+
if (typeof id !== 'number') {
|
|
247
|
+
return next();
|
|
248
|
+
}
|
|
249
|
+
try {
|
|
250
|
+
const user = await ObjectManagers_1.ObjectManagers.getInstance().UserManager.findOne({ id });
|
|
251
|
+
if (user) {
|
|
252
|
+
await AuthenticationMWs.startSession(req, user, req.session.rememberMe);
|
|
253
|
+
}
|
|
254
|
+
return next();
|
|
255
|
+
}
|
|
256
|
+
catch (err) {
|
|
257
|
+
return next(new Error_1.ErrorDTO(Error_1.ErrorCodes.GENERAL_ERROR, null, err));
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
static logout(req, res, next) {
|
|
261
|
+
delete req.session.context;
|
|
262
|
+
return next();
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Logs in the user (or sharing guest) for this session.
|
|
266
|
+
* Only "remember me" sessions survive closing the browser.
|
|
267
|
+
*/
|
|
268
|
+
static async startSession(req, user, rememberMe = false) {
|
|
269
|
+
const sm = ObjectManagers_1.ObjectManagers.getInstance().SessionManager;
|
|
270
|
+
const sessionUser = Utils_1.Utils.clone(user);
|
|
271
|
+
delete sessionUser.password;
|
|
272
|
+
req.session.context = await sm.buildContext(sessionUser);
|
|
273
|
+
req.session.stamp = await sm.getSessionStamp(sessionUser);
|
|
274
|
+
req.session.rememberMe = rememberMe;
|
|
275
|
+
AuthenticationMWs.extendSession(req);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* The session is stored in the cookie. It ends if it timed out or its user or sharing got deleted or changed
|
|
279
|
+
* (see SessionManager.getSessionStamp).
|
|
280
|
+
* Returns false if there is no session (anymore).
|
|
281
|
+
*/
|
|
282
|
+
static async restoreSession(req) {
|
|
283
|
+
const context = req.session.context;
|
|
284
|
+
if (typeof context === 'undefined') {
|
|
285
|
+
return false;
|
|
286
|
+
}
|
|
287
|
+
if (!context?.user || !(req.session.expires > Date.now()) || !req.session.stamp ||
|
|
288
|
+
req.session.stamp !== await ObjectManagers_1.ObjectManagers.getInstance().SessionManager.getSessionStamp(context.user)) {
|
|
289
|
+
delete req.session.context;
|
|
290
|
+
delete req.session.stamp;
|
|
291
|
+
delete req.session.rememberMe;
|
|
292
|
+
return false;
|
|
293
|
+
}
|
|
294
|
+
// fix context. projectionQuery gets lost in the session between calls
|
|
295
|
+
// Brackets do not survive serialization, so rebuild the context if they are not real Brackets anymore (fail closed)
|
|
296
|
+
if (AuthenticationMWs.isContextBroken(context)) {
|
|
297
|
+
req.session.context = await ObjectManagers_1.ObjectManagers.getInstance().SessionManager.buildContext(context.user);
|
|
298
|
+
}
|
|
299
|
+
AuthenticationMWs.extendSession(req);
|
|
300
|
+
return true;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Sessions expire after Server.sessionTimeout of inactivity.
|
|
304
|
+
*/
|
|
305
|
+
static extendSession(req) {
|
|
306
|
+
req.session.expires = Date.now() + Config_1.Config.Server.sessionTimeout;
|
|
307
|
+
if (req.session.rememberMe) {
|
|
308
|
+
req.sessionOptions.expires = new Date(req.session.expires);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Returns true if the prebuilt queries of the context got lost (e.g.: during session serialization)
|
|
313
|
+
*/
|
|
314
|
+
static isContextBroken(context) {
|
|
315
|
+
if (!context.user.projectionKey) {
|
|
316
|
+
return false; // context was never built
|
|
317
|
+
}
|
|
318
|
+
// Rebuild also if there is no projection, so config changes (e.g.: new allow/block lists) are applied
|
|
319
|
+
if (!(context.projectionQuery instanceof typeorm_1.Brackets)) {
|
|
320
|
+
return true;
|
|
321
|
+
}
|
|
322
|
+
// its methods and SQL filters are lost too
|
|
323
|
+
return !(context.directoryAccess instanceof DirectoryAccess_1.DirectoryAccess);
|
|
324
|
+
}
|
|
325
|
+
static getSharingKey(req) {
|
|
326
|
+
return req.query[QueryParams_1.QueryParams.gallery.sharingKey_query] ||
|
|
327
|
+
RequestParams_1.RequestParams.get(req, QueryParams_1.QueryParams.gallery.sharingKey_params);
|
|
328
|
+
}
|
|
329
|
+
static async getSharingUser(req) {
|
|
330
|
+
const sharingKey = this.getSharingKey(req);
|
|
331
|
+
if (Config_1.Config.Sharing.enabled === false || !(typeof sharingKey === 'string' && sharingKey !== '')) {
|
|
332
|
+
return null;
|
|
333
|
+
}
|
|
334
|
+
const sharing = await ObjectManagers_1.ObjectManagers.getInstance().SharingManager.findOne(sharingKey);
|
|
335
|
+
if (!sharing || sharing.expires < Date.now()) {
|
|
336
|
+
return null;
|
|
337
|
+
}
|
|
338
|
+
// no 'free login' if passwords are required, or it is set
|
|
339
|
+
if (Config_1.Config.Sharing.passwordRequired === true ||
|
|
340
|
+
sharing.password) {
|
|
341
|
+
return null;
|
|
342
|
+
}
|
|
343
|
+
return ObjectManagers_1.ObjectManagers.getInstance().SessionManager.createSharingUser(sharing);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
exports.AuthenticationMWs = AuthenticationMWs;
|
|
@@ -1,7 +1,38 @@
|
|
|
1
|
-
import { Request
|
|
1
|
+
import { Request } from 'express';
|
|
2
|
+
import { UserDTO } from '../../../common/entities/UserDTO';
|
|
2
3
|
export declare class OIDCAuthService {
|
|
3
|
-
private static
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
private static configurationPromise;
|
|
5
|
+
/**
|
|
6
|
+
* Step 1 of the OIDC authorization code flow: the URL of the authentication request at the provider.
|
|
7
|
+
* The provider sends the authentication response back to Users.oidc.redirectUri.
|
|
8
|
+
*/
|
|
9
|
+
static getAuthenticationRequestUrl(req: Request): Promise<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Step 2 of the OIDC authorization code flow: validates the authentication response,
|
|
12
|
+
* exchanges its code for the tokens and returns with the user of their claims.
|
|
13
|
+
*/
|
|
14
|
+
static getUserFromAuthenticationResponse(req: Request): Promise<UserDTO>;
|
|
15
|
+
private static findUser;
|
|
16
|
+
/**
|
|
17
|
+
* Strict security: the app user is bound to the provider account (issuer + subject).
|
|
18
|
+
* Name matching is only used to link a not yet linked user with a limited role.
|
|
19
|
+
*/
|
|
20
|
+
private static findStrictUser;
|
|
21
|
+
private static createUser;
|
|
22
|
+
/**
|
|
23
|
+
* Returns the ID token claims. Some providers only return
|
|
24
|
+
* some claims (e.g.: preferred_username, email) from the userinfo endpoint,
|
|
25
|
+
* so if any of the required ones is missing, they are filled from there.
|
|
26
|
+
* ID token claims always take precedence.
|
|
27
|
+
*/
|
|
28
|
+
private static getClaims;
|
|
29
|
+
/**
|
|
30
|
+
* The provider's discovery document URL. Like with openid-client 5, the issuer URL setting
|
|
31
|
+
* may also be the discovery document URL itself.
|
|
32
|
+
* The discovery document doesn't have to repeat the issuer URL setting character by character
|
|
33
|
+
* (e.g.: a missing trailing slash). The ID tokens are still checked against the issuer it names.
|
|
34
|
+
*/
|
|
35
|
+
private static getDiscoveryUrl;
|
|
36
|
+
private static discover;
|
|
37
|
+
private static getConfiguration;
|
|
7
38
|
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OIDCAuthService = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const Config_1 = require("../../../common/config/private/Config");
|
|
6
|
+
const node_crypto_1 = require("node:crypto");
|
|
7
|
+
const oidc = tslib_1.__importStar(require("openid-client"));
|
|
8
|
+
const Error_1 = require("../../../common/entities/Error");
|
|
9
|
+
const ObjectManagers_1 = require("../../model/ObjectManagers");
|
|
10
|
+
const Logger_1 = require("../../Logger");
|
|
11
|
+
const LOG_TAG = '[OIDCAuthService]';
|
|
12
|
+
// claims are JSON values; the ones used here are strings (numbers are accepted too)
|
|
13
|
+
const claimStr = (v) => typeof v === 'string' ? v : (typeof v === 'number' ? String(v) : '');
|
|
14
|
+
class OIDCAuthService {
|
|
15
|
+
static { this.configurationPromise = null; }
|
|
16
|
+
/**
|
|
17
|
+
* Step 1 of the OIDC authorization code flow: the URL of the authentication request at the provider.
|
|
18
|
+
* The provider sends the authentication response back to Users.oidc.redirectUri.
|
|
19
|
+
*/
|
|
20
|
+
static async getAuthenticationRequestUrl(req) {
|
|
21
|
+
const configuration = await this.getConfiguration();
|
|
22
|
+
const state = oidc.randomState();
|
|
23
|
+
const verifier = oidc.randomPKCECodeVerifier();
|
|
24
|
+
const challenge = await oidc.calculatePKCECodeChallenge(verifier);
|
|
25
|
+
req.session.oidc = {
|
|
26
|
+
state,
|
|
27
|
+
verifier
|
|
28
|
+
};
|
|
29
|
+
return oidc.buildAuthorizationUrl(configuration, {
|
|
30
|
+
redirect_uri: Config_1.Config.Users.oidc.redirectUri,
|
|
31
|
+
scope: Config_1.Config.Users.oidc.scopes.join(' '),
|
|
32
|
+
state,
|
|
33
|
+
code_challenge: challenge,
|
|
34
|
+
code_challenge_method: 'S256'
|
|
35
|
+
}).href;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Step 2 of the OIDC authorization code flow: validates the authentication response,
|
|
39
|
+
* exchanges its code for the tokens and returns with the user of their claims.
|
|
40
|
+
*/
|
|
41
|
+
static async getUserFromAuthenticationResponse(req) {
|
|
42
|
+
const storedOidc = req.session.oidc;
|
|
43
|
+
const params = req.query; // code, state
|
|
44
|
+
if (!storedOidc?.state || params['state'] !== storedOidc?.state) {
|
|
45
|
+
throw new Error_1.ErrorDTO(Error_1.ErrorCodes.GENERAL_ERROR, 'Invalid OIDC state');
|
|
46
|
+
}
|
|
47
|
+
const configuration = await this.getConfiguration();
|
|
48
|
+
// The provider knows the redirect URI, not the URL of this request (e.g.: behind a reverse proxy).
|
|
49
|
+
const callbackUrl = new URL(Config_1.Config.Users.oidc.redirectUri);
|
|
50
|
+
for (const [key, value] of Object.entries(params)) {
|
|
51
|
+
if (typeof value === 'string') {
|
|
52
|
+
callbackUrl.searchParams.set(key, value);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const tokens = await oidc.authorizationCodeGrant(configuration, callbackUrl, {
|
|
56
|
+
expectedState: storedOidc.state,
|
|
57
|
+
pkceCodeVerifier: storedOidc.verifier
|
|
58
|
+
});
|
|
59
|
+
const strict = Config_1.Config.Users.oidc.strictSecurity;
|
|
60
|
+
const usernameClaim = Config_1.Config.Users.oidc.usernameClaim || 'preferred_username';
|
|
61
|
+
const emailClaim = Config_1.Config.Users.oidc.emailClaim || 'email';
|
|
62
|
+
const claims = await this.getClaims(configuration, tokens, [usernameClaim, emailClaim]);
|
|
63
|
+
const preferredUserName = claimStr(claims[usernameClaim]);
|
|
64
|
+
const email = claimStr(claims[emailClaim]);
|
|
65
|
+
let emailName = '';
|
|
66
|
+
if (email) {
|
|
67
|
+
if (!strict) {
|
|
68
|
+
emailName = email.split('@')[0];
|
|
69
|
+
}
|
|
70
|
+
else if (claims['email_verified'] === true) {
|
|
71
|
+
emailName = email;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const matchedName = preferredUserName || emailName;
|
|
75
|
+
if (!matchedName) {
|
|
76
|
+
throw new Error_1.ErrorDTO(Error_1.ErrorCodes.CREDENTIAL_NOT_FOUND, 'OIDC: missing username/email');
|
|
77
|
+
}
|
|
78
|
+
// domain allow-list if configured
|
|
79
|
+
if (Config_1.Config.Users.oidc.allowedDomains && Config_1.Config.Users.oidc.allowedDomains.length > 0) {
|
|
80
|
+
const domain = email.split('@')[1] || '';
|
|
81
|
+
const allowed = Config_1.Config.Users.oidc.allowedDomains.some(d => d.toLowerCase() === domain.toLowerCase());
|
|
82
|
+
if (!allowed) {
|
|
83
|
+
throw new Error_1.ErrorDTO(Error_1.ErrorCodes.CREDENTIAL_NOT_FOUND, `Email domain not allowed: ${domain}`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const user = strict ?
|
|
87
|
+
await this.findStrictUser(claims, matchedName) :
|
|
88
|
+
await this.findUser(matchedName);
|
|
89
|
+
// cleanup
|
|
90
|
+
delete req.session.oidc;
|
|
91
|
+
return user;
|
|
92
|
+
}
|
|
93
|
+
static async findUser(name) {
|
|
94
|
+
let user = await ObjectManagers_1.ObjectManagers.getInstance().UserManager.findOne({ name });
|
|
95
|
+
if (!user && Config_1.Config.Users.oidc.autoCreateUser) {
|
|
96
|
+
user = await this.createUser(name);
|
|
97
|
+
}
|
|
98
|
+
if (!user) {
|
|
99
|
+
throw new Error_1.ErrorDTO(Error_1.ErrorCodes.CREDENTIAL_NOT_FOUND, 'User not found');
|
|
100
|
+
}
|
|
101
|
+
return user;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Strict security: the app user is bound to the provider account (issuer + subject).
|
|
105
|
+
* Name matching is only used to link a not yet linked user with a limited role.
|
|
106
|
+
*/
|
|
107
|
+
static async findStrictUser(claims, name) {
|
|
108
|
+
const iss = claims['iss'];
|
|
109
|
+
const sub = claims['sub'];
|
|
110
|
+
// the spec requires both to be strings; anything else must not map to a shared subject
|
|
111
|
+
if (typeof iss !== 'string' || typeof sub !== 'string' || !iss || !sub) {
|
|
112
|
+
throw new Error_1.ErrorDTO(Error_1.ErrorCodes.CREDENTIAL_NOT_FOUND, 'OIDC: missing sub/iss claim');
|
|
113
|
+
}
|
|
114
|
+
const subject = iss + '|' + sub;
|
|
115
|
+
const userManager = ObjectManagers_1.ObjectManagers.getInstance().UserManager;
|
|
116
|
+
let user = await userManager.findOne({ oidcSubject: subject });
|
|
117
|
+
if (user) {
|
|
118
|
+
return user;
|
|
119
|
+
}
|
|
120
|
+
user = await userManager.findOne({ name });
|
|
121
|
+
if (!user) {
|
|
122
|
+
if (!Config_1.Config.Users.oidc.autoCreateUser) {
|
|
123
|
+
throw new Error_1.ErrorDTO(Error_1.ErrorCodes.CREDENTIAL_NOT_FOUND, 'User not found');
|
|
124
|
+
}
|
|
125
|
+
return this.createUser(name, subject);
|
|
126
|
+
}
|
|
127
|
+
if (user.oidcSubject) {
|
|
128
|
+
Logger_1.Logger.warn(LOG_TAG, `User "${name}" is linked to a different OIDC account, refusing login`);
|
|
129
|
+
throw new Error_1.ErrorDTO(Error_1.ErrorCodes.CREDENTIAL_NOT_FOUND, 'User is linked to a different OIDC account');
|
|
130
|
+
}
|
|
131
|
+
if (user.role > Config_1.Config.Users.oidc.strictLinkMaxRole) {
|
|
132
|
+
Logger_1.Logger.warn(LOG_TAG, `User "${name}" has a higher role than "Max role for linking", refusing to link`);
|
|
133
|
+
throw new Error_1.ErrorDTO(Error_1.ErrorCodes.CREDENTIAL_NOT_FOUND, 'User role is too high for OIDC linking');
|
|
134
|
+
}
|
|
135
|
+
Logger_1.Logger.info(LOG_TAG, `Linking user "${name}" to OIDC account`);
|
|
136
|
+
return userManager.setOidcSubject(user.id, subject);
|
|
137
|
+
}
|
|
138
|
+
static createUser(name, oidcSubject) {
|
|
139
|
+
// nobody knows this password, but it still has to be unguessable: it works on the login page too
|
|
140
|
+
const rnd = (0, node_crypto_1.randomBytes)(32).toString('base64url');
|
|
141
|
+
const newUser = { name, password: rnd, role: Config_1.Config.Users.oidc.autoCreateUserRole, oidcSubject };
|
|
142
|
+
return ObjectManagers_1.ObjectManagers.getInstance().UserManager.createUser(newUser);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Returns the ID token claims. Some providers only return
|
|
146
|
+
* some claims (e.g.: preferred_username, email) from the userinfo endpoint,
|
|
147
|
+
* so if any of the required ones is missing, they are filled from there.
|
|
148
|
+
* ID token claims always take precedence.
|
|
149
|
+
*/
|
|
150
|
+
static async getClaims(configuration, tokens, requiredClaims) {
|
|
151
|
+
const idToken = tokens.claims();
|
|
152
|
+
if (!idToken) {
|
|
153
|
+
throw new Error_1.ErrorDTO(Error_1.ErrorCodes.CREDENTIAL_NOT_FOUND, 'OIDC: missing ID token');
|
|
154
|
+
}
|
|
155
|
+
const claims = { ...idToken };
|
|
156
|
+
if (requiredClaims.every(c => !!claims[c])) {
|
|
157
|
+
return claims;
|
|
158
|
+
}
|
|
159
|
+
try {
|
|
160
|
+
// fails if userinfo belongs to a different subject than the ID token (the spec requires them to match)
|
|
161
|
+
const userinfo = await oidc.fetchUserInfo(configuration, tokens.access_token, idToken.sub);
|
|
162
|
+
for (const key of Object.keys(userinfo)) {
|
|
163
|
+
if (!claims[key]) {
|
|
164
|
+
claims[key] = userinfo[key];
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
catch (err) {
|
|
169
|
+
Logger_1.Logger.warn(LOG_TAG, 'Failed to fetch OIDC userinfo, using the ID token claims only: ' +
|
|
170
|
+
(err instanceof Error ? err.message : String(err)));
|
|
171
|
+
}
|
|
172
|
+
return claims;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* The provider's discovery document URL. Like with openid-client 5, the issuer URL setting
|
|
176
|
+
* may also be the discovery document URL itself.
|
|
177
|
+
* The discovery document doesn't have to repeat the issuer URL setting character by character
|
|
178
|
+
* (e.g.: a missing trailing slash). The ID tokens are still checked against the issuer it names.
|
|
179
|
+
*/
|
|
180
|
+
static getDiscoveryUrl(issuerUrl) {
|
|
181
|
+
const url = new URL(issuerUrl);
|
|
182
|
+
if (!url.pathname.includes('/.well-known/')) {
|
|
183
|
+
url.pathname = url.pathname.replace(/\/?$/, '/.well-known/openid-configuration');
|
|
184
|
+
}
|
|
185
|
+
return url;
|
|
186
|
+
}
|
|
187
|
+
static discover(issuerUrl) {
|
|
188
|
+
const discoveryUrl = this.getDiscoveryUrl(issuerUrl);
|
|
189
|
+
const execute = [];
|
|
190
|
+
if (discoveryUrl.protocol === 'http:') {
|
|
191
|
+
// for local test setups: the provider can't be authenticated over http, and the tokens can be read on the way
|
|
192
|
+
Logger_1.Logger.warn(LOG_TAG, 'OIDC issuer URL is not https, allowing insecure requests to the provider');
|
|
193
|
+
execute.push(oidc.allowInsecureRequests);
|
|
194
|
+
}
|
|
195
|
+
const secret = Config_1.Config.Users.oidc.clientSecret;
|
|
196
|
+
return oidc.discovery(discoveryUrl, Config_1.Config.Users.oidc.clientId, undefined, secret ? oidc.ClientSecretBasic(secret) : oidc.None(), { execute });
|
|
197
|
+
}
|
|
198
|
+
static getConfiguration() {
|
|
199
|
+
if (!this.configurationPromise) {
|
|
200
|
+
if (!Config_1.Config.Users.oidc.enabled) {
|
|
201
|
+
throw new Error('OIDC is not enabled');
|
|
202
|
+
}
|
|
203
|
+
const issuerUrl = Config_1.Config.Users.oidc.issuerUrl;
|
|
204
|
+
if (!issuerUrl) {
|
|
205
|
+
throw new Error('OIDC issuerUrl is not configured');
|
|
206
|
+
}
|
|
207
|
+
// a failed discovery (e.g.: the provider is down) is not kept, the next login tries again
|
|
208
|
+
this.configurationPromise = this.discover(issuerUrl).catch((err) => {
|
|
209
|
+
this.configurationPromise = null;
|
|
210
|
+
throw err;
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
return this.configurationPromise;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
exports.OIDCAuthService = OIDCAuthService;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NextFunction, Request, Response } from 'express';
|
|
2
|
+
export declare class OIDCMWs {
|
|
3
|
+
static isEnabled(req: Request, res: Response, next: NextFunction): void;
|
|
4
|
+
/**
|
|
5
|
+
* Sends the authentication request to the OIDC provider.
|
|
6
|
+
* Its response arrives at the redirectUri (see AuthenticationMWs.oidcLogin).
|
|
7
|
+
*/
|
|
8
|
+
static redirectToProvider(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
9
|
+
static redirectToApp(req: Request, res: Response): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OIDCMWs = void 0;
|
|
4
|
+
const Config_1 = require("../../../common/config/private/Config");
|
|
5
|
+
const OIDCAuthService_1 = require("./OIDCAuthService");
|
|
6
|
+
class OIDCMWs {
|
|
7
|
+
static isEnabled(req, res, next) {
|
|
8
|
+
if (!Config_1.Config.Users.oidc.enabled) {
|
|
9
|
+
res.status(404).end();
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
return next();
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Sends the authentication request to the OIDC provider.
|
|
16
|
+
* Its response arrives at the redirectUri (see AuthenticationMWs.oidcLogin).
|
|
17
|
+
*/
|
|
18
|
+
static async redirectToProvider(req, res, next) {
|
|
19
|
+
try {
|
|
20
|
+
res.redirect(await OIDCAuthService_1.OIDCAuthService.getAuthenticationRequestUrl(req));
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
return next(err);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
static redirectToApp(req, res) {
|
|
27
|
+
res.redirect(Config_1.Config.Server.getAppUrl());
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.OIDCMWs = OIDCMWs;
|
|
@@ -4,5 +4,6 @@ export declare class UserMWs {
|
|
|
4
4
|
static deleteUser(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
5
5
|
static changeRole(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
6
6
|
static updateSettings(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
7
|
+
static unlinkOidc(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
7
8
|
static listUsers(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
8
9
|
}
|