@ngageoint/mage.service 6.2.2
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/bin/mage.service.js +230 -0
- package/bin/migration.js +60 -0
- package/bin/poststop.sh +1 -0
- package/bin/prestart.sh +1 -0
- package/lib/@types/express/index.d.ts +18 -0
- package/lib/@types/geojson-validation/index.d.ts +15 -0
- package/lib/@types/mongodb-migrations/index.d.ts +99 -0
- package/lib/access/index.d.ts +21 -0
- package/lib/access/index.d.ts.map +1 -0
- package/lib/access/index.js +40 -0
- package/lib/access/index.js.map +1 -0
- package/lib/adapters/adapters.controllers.web.d.ts +22 -0
- package/lib/adapters/adapters.controllers.web.d.ts.map +1 -0
- package/lib/adapters/adapters.controllers.web.js +55 -0
- package/lib/adapters/adapters.controllers.web.js.map +1 -0
- package/lib/adapters/adapters.db.mongoose.d.ts +5 -0
- package/lib/adapters/adapters.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/adapters.db.mongoose.js +70 -0
- package/lib/adapters/adapters.db.mongoose.js.map +1 -0
- package/lib/adapters/adapters.simple_id_factory.d.ts +5 -0
- package/lib/adapters/adapters.simple_id_factory.d.ts.map +1 -0
- package/lib/adapters/adapters.simple_id_factory.js +24 -0
- package/lib/adapters/adapters.simple_id_factory.js.map +1 -0
- package/lib/adapters/base/adapters.base.db.mongoose.d.ts +59 -0
- package/lib/adapters/base/adapters.base.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/base/adapters.base.db.mongoose.js +143 -0
- package/lib/adapters/base/adapters.base.db.mongoose.js.map +1 -0
- package/lib/adapters/events/adapters.events.controllers.web.d.ts +14 -0
- package/lib/adapters/events/adapters.events.controllers.web.d.ts.map +1 -0
- package/lib/adapters/events/adapters.events.controllers.web.js +83 -0
- package/lib/adapters/events/adapters.events.controllers.web.js.map +1 -0
- package/lib/adapters/events/adapters.events.db.mongoose.d.ts +27 -0
- package/lib/adapters/events/adapters.events.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/events/adapters.events.db.mongoose.js +127 -0
- package/lib/adapters/events/adapters.events.db.mongoose.js.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.controllers.web.d.ts +25 -0
- package/lib/adapters/feeds/adapters.feeds.controllers.web.d.ts.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.controllers.web.js +234 -0
- package/lib/adapters/feeds/adapters.feeds.controllers.web.js.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.d.ts +63 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.js +199 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.js.map +1 -0
- package/lib/adapters/icons/adapters.icons.content_store.file_system.d.ts +7 -0
- package/lib/adapters/icons/adapters.icons.content_store.file_system.d.ts.map +1 -0
- package/lib/adapters/icons/adapters.icons.content_store.file_system.js +13 -0
- package/lib/adapters/icons/adapters.icons.content_store.file_system.js.map +1 -0
- package/lib/adapters/icons/adapters.icons.controllers.web.d.ts +10 -0
- package/lib/adapters/icons/adapters.icons.controllers.web.d.ts.map +1 -0
- package/lib/adapters/icons/adapters.icons.controllers.web.js +118 -0
- package/lib/adapters/icons/adapters.icons.controllers.web.js.map +1 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.d.ts +38 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.js +287 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.js.map +1 -0
- package/lib/adapters/observations/adapters.observations.attachment_store.file_system.d.ts +29 -0
- package/lib/adapters/observations/adapters.observations.attachment_store.file_system.d.ts.map +1 -0
- package/lib/adapters/observations/adapters.observations.attachment_store.file_system.js +274 -0
- package/lib/adapters/observations/adapters.observations.attachment_store.file_system.js.map +1 -0
- package/lib/adapters/observations/adapters.observations.controllers.web.d.ts +40 -0
- package/lib/adapters/observations/adapters.observations.controllers.web.d.ts.map +1 -0
- package/lib/adapters/observations/adapters.observations.controllers.web.js +196 -0
- package/lib/adapters/observations/adapters.observations.controllers.web.js.map +1 -0
- package/lib/adapters/observations/adapters.observations.db.mongoose.d.ts +30 -0
- package/lib/adapters/observations/adapters.observations.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/observations/adapters.observations.db.mongoose.js +294 -0
- package/lib/adapters/observations/adapters.observations.db.mongoose.js.map +1 -0
- package/lib/adapters/plugins/adapters.plugins.db.mongoose.d.ts +17 -0
- package/lib/adapters/plugins/adapters.plugins.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/plugins/adapters.plugins.db.mongoose.js +59 -0
- package/lib/adapters/plugins/adapters.plugins.db.mongoose.js.map +1 -0
- package/lib/adapters/url_schemes/adapters.url_schemes.plugin.d.ts +38 -0
- package/lib/adapters/url_schemes/adapters.url_schemes.plugin.d.ts.map +1 -0
- package/lib/adapters/url_schemes/adapters.url_schemes.plugin.js +110 -0
- package/lib/adapters/url_schemes/adapters.url_schemes.plugin.js.map +1 -0
- package/lib/adapters/users/adapters.users.controllers.web.d.ts +7 -0
- package/lib/adapters/users/adapters.users.controllers.web.d.ts.map +1 -0
- package/lib/adapters/users/adapters.users.controllers.web.js +37 -0
- package/lib/adapters/users/adapters.users.controllers.web.js.map +1 -0
- package/lib/adapters/users/adapters.users.db.mongoose.d.ts +19 -0
- package/lib/adapters/users/adapters.users.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/users/adapters.users.db.mongoose.js +126 -0
- package/lib/adapters/users/adapters.users.db.mongoose.js.map +1 -0
- package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.d.ts +3 -0
- package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.d.ts.map +1 -0
- package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.js +53 -0
- package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.js.map +1 -0
- package/lib/api/attachment.d.ts +12 -0
- package/lib/api/attachment.d.ts.map +1 -0
- package/lib/api/attachment.js +81 -0
- package/lib/api/attachment.js.map +1 -0
- package/lib/api/event.d.ts +20 -0
- package/lib/api/event.d.ts.map +1 -0
- package/lib/api/event.js +185 -0
- package/lib/api/event.js.map +1 -0
- package/lib/api/events/location.d.ts +11 -0
- package/lib/api/events/location.d.ts.map +1 -0
- package/lib/api/events/location.js +13 -0
- package/lib/api/events/location.js.map +1 -0
- package/lib/api/events/observation.d.ts +15 -0
- package/lib/api/events/observation.d.ts.map +1 -0
- package/lib/api/events/observation.js +21 -0
- package/lib/api/events/observation.js.map +1 -0
- package/lib/api/feature.d.ts +8 -0
- package/lib/api/feature.d.ts.map +1 -0
- package/lib/api/feature.js +15 -0
- package/lib/api/feature.js.map +1 -0
- package/lib/api/field/attachmentField.d.ts +12 -0
- package/lib/api/field/attachmentField.d.ts.map +1 -0
- package/lib/api/field/attachmentField.js +40 -0
- package/lib/api/field/attachmentField.js.map +1 -0
- package/lib/api/field/checkboxField.d.ts +7 -0
- package/lib/api/field/checkboxField.d.ts.map +1 -0
- package/lib/api/field/checkboxField.js +19 -0
- package/lib/api/field/checkboxField.js.map +1 -0
- package/lib/api/field/dateField.d.ts +8 -0
- package/lib/api/field/dateField.d.ts.map +1 -0
- package/lib/api/field/dateField.js +21 -0
- package/lib/api/field/dateField.js.map +1 -0
- package/lib/api/field/emailField.d.ts +7 -0
- package/lib/api/field/emailField.d.ts.map +1 -0
- package/lib/api/field/emailField.js +19 -0
- package/lib/api/field/emailField.js.map +1 -0
- package/lib/api/field/field.d.ts +12 -0
- package/lib/api/field/field.d.ts.map +1 -0
- package/lib/api/field/field.js +12 -0
- package/lib/api/field/field.js.map +1 -0
- package/lib/api/field/geometryField.d.ts +7 -0
- package/lib/api/field/geometryField.d.ts.map +1 -0
- package/lib/api/field/geometryField.js +35 -0
- package/lib/api/field/geometryField.js.map +1 -0
- package/lib/api/field/index.d.ts +7 -0
- package/lib/api/field/index.d.ts.map +1 -0
- package/lib/api/field/index.js +30 -0
- package/lib/api/field/index.js.map +1 -0
- package/lib/api/field/multiSelectField.d.ts +7 -0
- package/lib/api/field/multiSelectField.d.ts.map +1 -0
- package/lib/api/field/multiSelectField.js +27 -0
- package/lib/api/field/multiSelectField.js.map +1 -0
- package/lib/api/field/numberField.d.ts +7 -0
- package/lib/api/field/numberField.d.ts.map +1 -0
- package/lib/api/field/numberField.js +27 -0
- package/lib/api/field/numberField.js.map +1 -0
- package/lib/api/field/selectField.d.ts +7 -0
- package/lib/api/field/selectField.d.ts.map +1 -0
- package/lib/api/field/selectField.js +22 -0
- package/lib/api/field/selectField.js.map +1 -0
- package/lib/api/field/textField.d.ts +7 -0
- package/lib/api/field/textField.d.ts.map +1 -0
- package/lib/api/field/textField.js +21 -0
- package/lib/api/field/textField.js.map +1 -0
- package/lib/api/form.d.ts +12 -0
- package/lib/api/form.d.ts.map +1 -0
- package/lib/api/form.js +239 -0
- package/lib/api/form.js.map +1 -0
- package/lib/api/icon.d.ts +22 -0
- package/lib/api/icon.d.ts.map +1 -0
- package/lib/api/icon.js +178 -0
- package/lib/api/icon.js.map +1 -0
- package/lib/api/index.d.ts +10 -0
- package/lib/api/index.d.ts.map +1 -0
- package/lib/api/index.js +11 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/layer.d.ts +14 -0
- package/lib/api/layer.d.ts.map +1 -0
- package/lib/api/layer.js +70 -0
- package/lib/api/layer.js.map +1 -0
- package/lib/api/location.d.ts +14 -0
- package/lib/api/location.d.ts.map +1 -0
- package/lib/api/location.js +35 -0
- package/lib/api/location.js.map +1 -0
- package/lib/api/observation.d.ts +25 -0
- package/lib/api/observation.d.ts.map +1 -0
- package/lib/api/observation.js +224 -0
- package/lib/api/observation.js.map +1 -0
- package/lib/api/user.d.ts +16 -0
- package/lib/api/user.d.ts.map +1 -0
- package/lib/api/user.js +250 -0
- package/lib/api/user.js.map +1 -0
- package/lib/app.api/app.api.errors.d.ts +42 -0
- package/lib/app.api/app.api.errors.d.ts.map +1 -0
- package/lib/app.api/app.api.errors.js +43 -0
- package/lib/app.api/app.api.errors.js.map +1 -0
- package/lib/app.api/app.api.global.d.ts +74 -0
- package/lib/app.api/app.api.global.d.ts.map +1 -0
- package/lib/app.api/app.api.global.js +59 -0
- package/lib/app.api/app.api.global.js.map +1 -0
- package/lib/app.api/events/app.api.events.d.ts +31 -0
- package/lib/app.api/events/app.api.events.d.ts.map +1 -0
- package/lib/app.api/events/app.api.events.js +3 -0
- package/lib/app.api/events/app.api.events.js.map +1 -0
- package/lib/app.api/feeds/app.api.feeds.d.ts +139 -0
- package/lib/app.api/feeds/app.api.feeds.d.ts.map +1 -0
- package/lib/app.api/feeds/app.api.feeds.js +26 -0
- package/lib/app.api/feeds/app.api.feeds.js.map +1 -0
- package/lib/app.api/icons/app.api.icons.d.ts +60 -0
- package/lib/app.api/icons/app.api.icons.d.ts.map +1 -0
- package/lib/app.api/icons/app.api.icons.js +29 -0
- package/lib/app.api/icons/app.api.icons.js.map +1 -0
- package/lib/app.api/observations/app.api.observations.d.ts +126 -0
- package/lib/app.api/observations/app.api.observations.d.ts.map +1 -0
- package/lib/app.api/observations/app.api.observations.js +61 -0
- package/lib/app.api/observations/app.api.observations.js.map +1 -0
- package/lib/app.api/users/app.api.users.d.ts +24 -0
- package/lib/app.api/users/app.api.users.d.ts.map +1 -0
- package/lib/app.api/users/app.api.users.js +3 -0
- package/lib/app.api/users/app.api.users.js.map +1 -0
- package/lib/app.d.ts +38 -0
- package/lib/app.d.ts.map +1 -0
- package/lib/app.impl/events/app.impl.events.d.ts +8 -0
- package/lib/app.impl/events/app.impl.events.d.ts.map +1 -0
- package/lib/app.impl/events/app.impl.events.js +107 -0
- package/lib/app.impl/events/app.impl.events.js.map +1 -0
- package/lib/app.impl/feeds/app.impl.feeds.d.ts +21 -0
- package/lib/app.impl/feeds/app.impl.feeds.d.ts.map +1 -0
- package/lib/app.impl/feeds/app.impl.feeds.js +527 -0
- package/lib/app.impl/feeds/app.impl.feeds.js.map +1 -0
- package/lib/app.impl/icons/app.impl.icons.d.ts +7 -0
- package/lib/app.impl/icons/app.impl.icons.d.ts.map +1 -0
- package/lib/app.impl/icons/app.impl.icons.js +81 -0
- package/lib/app.impl/icons/app.impl.icons.js.map +1 -0
- package/lib/app.impl/observations/app.impl.observations.d.ts +11 -0
- package/lib/app.impl/observations/app.impl.observations.d.ts.map +1 -0
- package/lib/app.impl/observations/app.impl.observations.js +357 -0
- package/lib/app.impl/observations/app.impl.observations.js.map +1 -0
- package/lib/app.impl/users/app.impl.users.d.ts +4 -0
- package/lib/app.impl/users/app.impl.users.d.ts.map +1 -0
- package/lib/app.impl/users/app.impl.users.js +37 -0
- package/lib/app.impl/users/app.impl.users.js.map +1 -0
- package/lib/app.js +507 -0
- package/lib/app.js.map +1 -0
- package/lib/assets/default-icon.png +0 -0
- package/lib/authentication/anonymous.d.ts +6 -0
- package/lib/authentication/anonymous.d.ts.map +1 -0
- package/lib/authentication/anonymous.js +17 -0
- package/lib/authentication/anonymous.js.map +1 -0
- package/lib/authentication/index.d.ts +24 -0
- package/lib/authentication/index.d.ts.map +1 -0
- package/lib/authentication/index.js +104 -0
- package/lib/authentication/index.js.map +1 -0
- package/lib/authentication/ldap.d.ts +2 -0
- package/lib/authentication/ldap.d.ts.map +1 -0
- package/lib/authentication/ldap.js +130 -0
- package/lib/authentication/ldap.js.map +1 -0
- package/lib/authentication/local.d.ts +2 -0
- package/lib/authentication/local.d.ts.map +1 -0
- package/lib/authentication/local.js +77 -0
- package/lib/authentication/local.js.map +1 -0
- package/lib/authentication/oauth.d.ts +2 -0
- package/lib/authentication/oauth.d.ts.map +1 -0
- package/lib/authentication/oauth.js +197 -0
- package/lib/authentication/oauth.js.map +1 -0
- package/lib/authentication/openidconnect.d.ts +2 -0
- package/lib/authentication/openidconnect.d.ts.map +1 -0
- package/lib/authentication/openidconnect.js +148 -0
- package/lib/authentication/openidconnect.js.map +1 -0
- package/lib/authentication/saml.d.ts +2 -0
- package/lib/authentication/saml.d.ts.map +1 -0
- package/lib/authentication/saml.js +287 -0
- package/lib/authentication/saml.js.map +1 -0
- package/lib/authentication/verification.d.ts +33 -0
- package/lib/authentication/verification.d.ts.map +1 -0
- package/lib/authentication/verification.js +144 -0
- package/lib/authentication/verification.js.map +1 -0
- package/lib/config.d.ts +15 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +20 -0
- package/lib/config.js.map +1 -0
- package/lib/dist-package.json +203 -0
- package/lib/docs/auth/local.yaml +90 -0
- package/lib/docs/geojson.yaml +375 -0
- package/lib/docs/openapi.yaml +4591 -0
- package/lib/entities/authentication/entities.authentication.d.ts +14 -0
- package/lib/entities/authentication/entities.authentication.d.ts.map +1 -0
- package/lib/entities/authentication/entities.authentication.js +3 -0
- package/lib/entities/authentication/entities.authentication.js.map +1 -0
- package/lib/entities/authorization/entities.authorization.d.ts +7 -0
- package/lib/entities/authorization/entities.authorization.d.ts.map +1 -0
- package/lib/entities/authorization/entities.authorization.js +3 -0
- package/lib/entities/authorization/entities.authorization.js.map +1 -0
- package/lib/entities/authorization/entities.permissions.d.ts +143 -0
- package/lib/entities/authorization/entities.permissions.d.ts.map +1 -0
- package/lib/entities/authorization/entities.permissions.js +101 -0
- package/lib/entities/authorization/entities.permissions.js.map +1 -0
- package/lib/entities/entities.domain_events.d.ts +1 -0
- package/lib/entities/entities.domain_events.d.ts.map +1 -0
- package/lib/entities/entities.domain_events.js +20 -0
- package/lib/entities/entities.domain_events.js.map +1 -0
- package/lib/entities/entities.global.d.ts +107 -0
- package/lib/entities/entities.global.d.ts.map +1 -0
- package/lib/entities/entities.global.js +67 -0
- package/lib/entities/entities.global.js.map +1 -0
- package/lib/entities/entities.i18n.d.ts +78 -0
- package/lib/entities/entities.i18n.d.ts.map +1 -0
- package/lib/entities/entities.i18n.js +69 -0
- package/lib/entities/entities.i18n.js.map +1 -0
- package/lib/entities/entities.json_types.d.ts +42 -0
- package/lib/entities/entities.json_types.d.ts.map +1 -0
- package/lib/entities/entities.json_types.js +3 -0
- package/lib/entities/entities.json_types.js.map +1 -0
- package/lib/entities/events/entities.events.d.ts +118 -0
- package/lib/entities/events/entities.events.d.ts.map +1 -0
- package/lib/entities/events/entities.events.forms.d.ts +132 -0
- package/lib/entities/events/entities.events.forms.d.ts.map +1 -0
- package/lib/entities/events/entities.events.forms.js +102 -0
- package/lib/entities/events/entities.events.forms.js.map +1 -0
- package/lib/entities/events/entities.events.js +146 -0
- package/lib/entities/events/entities.events.js.map +1 -0
- package/lib/entities/feeds/entities.feeds.d.ts +340 -0
- package/lib/entities/feeds/entities.feeds.d.ts.map +1 -0
- package/lib/entities/feeds/entities.feeds.js +213 -0
- package/lib/entities/feeds/entities.feeds.js.map +1 -0
- package/lib/entities/icons/entities.icons.d.ts +106 -0
- package/lib/entities/icons/entities.icons.d.ts.map +1 -0
- package/lib/entities/icons/entities.icons.js +26 -0
- package/lib/entities/icons/entities.icons.js.map +1 -0
- package/lib/entities/observations/entities.observations.d.ts +569 -0
- package/lib/entities/observations/entities.observations.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.attachment.d.ts +5 -0
- package/lib/entities/observations/entities.observations.fields.attachment.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.attachment.js +24 -0
- package/lib/entities/observations/entities.observations.fields.attachment.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.checkbox.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.checkbox.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.checkbox.js +17 -0
- package/lib/entities/observations/entities.observations.fields.checkbox.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.d.ts +20 -0
- package/lib/entities/observations/entities.observations.fields.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.date.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.date.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.date.js +21 -0
- package/lib/entities/observations/entities.observations.fields.date.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.email.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.email.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.email.js +20 -0
- package/lib/entities/observations/entities.observations.fields.email.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.geometry.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.geometry.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.geometry.js +62 -0
- package/lib/entities/observations/entities.observations.fields.geometry.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.js +37 -0
- package/lib/entities/observations/entities.observations.fields.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.multiselect.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.multiselect.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.multiselect.js +24 -0
- package/lib/entities/observations/entities.observations.fields.multiselect.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.numeric.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.numeric.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.numeric.js +24 -0
- package/lib/entities/observations/entities.observations.fields.numeric.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.required.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.required.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.required.js +14 -0
- package/lib/entities/observations/entities.observations.fields.required.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.select.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.select.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.select.js +17 -0
- package/lib/entities/observations/entities.observations.fields.select.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.text.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.text.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.text.js +15 -0
- package/lib/entities/observations/entities.observations.fields.text.js.map +1 -0
- package/lib/entities/observations/entities.observations.js +873 -0
- package/lib/entities/observations/entities.observations.js.map +1 -0
- package/lib/entities/ogcapi-features/entities.ogcapi-features.d.ts +98 -0
- package/lib/entities/ogcapi-features/entities.ogcapi-features.d.ts.map +1 -0
- package/lib/entities/ogcapi-features/entities.ogcapi-features.js +30 -0
- package/lib/entities/ogcapi-features/entities.ogcapi-features.js.map +1 -0
- package/lib/entities/teams/entities.teams.d.ts +26 -0
- package/lib/entities/teams/entities.teams.d.ts.map +1 -0
- package/lib/entities/teams/entities.teams.js +3 -0
- package/lib/entities/teams/entities.teams.js.map +1 -0
- package/lib/entities/users/entities.users.d.ts +66 -0
- package/lib/entities/users/entities.users.d.ts.map +1 -0
- package/lib/entities/users/entities.users.js +10 -0
- package/lib/entities/users/entities.users.js.map +1 -0
- package/lib/environment/env.d.ts +29 -0
- package/lib/environment/env.d.ts.map +1 -0
- package/lib/environment/env.js +106 -0
- package/lib/environment/env.js.map +1 -0
- package/lib/export/csv.d.ts +11 -0
- package/lib/export/csv.d.ts.map +1 -0
- package/lib/export/csv.js +243 -0
- package/lib/export/csv.js.map +1 -0
- package/lib/export/exporter.d.ts +12 -0
- package/lib/export/exporter.d.ts.map +1 -0
- package/lib/export/exporter.js +38 -0
- package/lib/export/exporter.js.map +1 -0
- package/lib/export/exporterFactory.d.ts +11 -0
- package/lib/export/exporterFactory.d.ts.map +1 -0
- package/lib/export/exporterFactory.js +17 -0
- package/lib/export/exporterFactory.js.map +1 -0
- package/lib/export/geojson.d.ts +10 -0
- package/lib/export/geojson.d.ts.map +1 -0
- package/lib/export/geojson.js +167 -0
- package/lib/export/geojson.js.map +1 -0
- package/lib/export/geopackage.d.ts +25 -0
- package/lib/export/geopackage.d.ts.map +1 -0
- package/lib/export/geopackage.js +687 -0
- package/lib/export/geopackage.js.map +1 -0
- package/lib/export/kml.d.ts +10 -0
- package/lib/export/kml.d.ts.map +1 -0
- package/lib/export/kml.js +128 -0
- package/lib/export/kml.js.map +1 -0
- package/lib/export/kmlWriter.d.ts +24 -0
- package/lib/export/kmlWriter.d.ts.map +1 -0
- package/lib/export/kmlWriter.js +431 -0
- package/lib/export/kmlWriter.js.map +1 -0
- package/lib/express.d.ts +9 -0
- package/lib/express.d.ts.map +1 -0
- package/lib/express.js +70 -0
- package/lib/express.js.map +1 -0
- package/lib/format/geoJsonFormat.d.ts +3 -0
- package/lib/format/geoJsonFormat.d.ts.map +1 -0
- package/lib/format/geoJsonFormat.js +65 -0
- package/lib/format/geoJsonFormat.js.map +1 -0
- package/lib/logger.d.ts +2 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +21 -0
- package/lib/logger.js.map +1 -0
- package/lib/main.impl/main.impl.plugins.d.ts +12 -0
- package/lib/main.impl/main.impl.plugins.d.ts.map +1 -0
- package/lib/main.impl/main.impl.plugins.js +41 -0
- package/lib/main.impl/main.impl.plugins.js.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.d.ts +3 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.d.ts.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.js +32 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.js.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.d.ts +4 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.d.ts.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.js +26 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.js.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.d.ts +4 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.d.ts.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.js +41 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.js.map +1 -0
- package/lib/migrate.d.ts +4 -0
- package/lib/migrate.d.ts.map +1 -0
- package/lib/migrate.js +96 -0
- package/lib/migrate.js.map +1 -0
- package/lib/migrations/002-create-user-role.d.ts +4 -0
- package/lib/migrations/002-create-user-role.d.ts.map +1 -0
- package/lib/migrations/002-create-user-role.js +30 -0
- package/lib/migrations/002-create-user-role.js.map +1 -0
- package/lib/migrations/003-create-admin-role.d.ts +4 -0
- package/lib/migrations/003-create-admin-role.d.ts.map +1 -0
- package/lib/migrations/003-create-admin-role.js +31 -0
- package/lib/migrations/003-create-admin-role.js.map +1 -0
- package/lib/migrations/005-create-osm-layer.d.ts +4 -0
- package/lib/migrations/005-create-osm-layer.d.ts.map +1 -0
- package/lib/migrations/005-create-osm-layer.js +51 -0
- package/lib/migrations/005-create-osm-layer.js.map +1 -0
- package/lib/migrations/006-event-teams.d.ts +4 -0
- package/lib/migrations/006-event-teams.d.ts.map +1 -0
- package/lib/migrations/006-event-teams.js +40 -0
- package/lib/migrations/006-event-teams.js.map +1 -0
- package/lib/migrations/007-user-icon.d.ts +4 -0
- package/lib/migrations/007-user-icon.d.ts.map +1 -0
- package/lib/migrations/007-user-icon.js +21 -0
- package/lib/migrations/007-user-icon.js.map +1 -0
- package/lib/migrations/008-create-user-no-edit-role.d.ts +4 -0
- package/lib/migrations/008-create-user-no-edit-role.d.ts.map +1 -0
- package/lib/migrations/008-create-user-no-edit-role.js +34 -0
- package/lib/migrations/008-create-user-no-edit-role.js.map +1 -0
- package/lib/migrations/009-create-manager-role.d.ts +4 -0
- package/lib/migrations/009-create-manager-role.d.ts.map +1 -0
- package/lib/migrations/009-create-manager-role.js +50 -0
- package/lib/migrations/009-create-manager-role.js.map +1 -0
- package/lib/migrations/010-add-user-device-manager-role.d.ts +4 -0
- package/lib/migrations/010-add-user-device-manager-role.d.ts.map +1 -0
- package/lib/migrations/010-add-user-device-manager-role.js +38 -0
- package/lib/migrations/010-add-user-device-manager-role.js.map +1 -0
- package/lib/migrations/011-multiple-forms.d.ts +4 -0
- package/lib/migrations/011-multiple-forms.d.ts.map +1 -0
- package/lib/migrations/011-multiple-forms.js +161 -0
- package/lib/migrations/011-multiple-forms.js.map +1 -0
- package/lib/migrations/012-user-role-remove-delete.d.ts +4 -0
- package/lib/migrations/012-user-role-remove-delete.d.ts.map +1 -0
- package/lib/migrations/012-user-role-remove-delete.js +15 -0
- package/lib/migrations/012-user-role-remove-delete.js.map +1 -0
- package/lib/migrations/013-ensure-event-indexes.d.ts +4 -0
- package/lib/migrations/013-ensure-event-indexes.d.ts.map +1 -0
- package/lib/migrations/013-ensure-event-indexes.js +50 -0
- package/lib/migrations/013-ensure-event-indexes.js.map +1 -0
- package/lib/migrations/014-add-role-update-permission.d.ts +4 -0
- package/lib/migrations/014-add-role-update-permission.d.ts.map +1 -0
- package/lib/migrations/014-add-role-update-permission.js +15 -0
- package/lib/migrations/014-add-role-update-permission.js.map +1 -0
- package/lib/migrations/015-manager-role-add-user-create.d.ts +4 -0
- package/lib/migrations/015-manager-role-add-user-create.d.ts.map +1 -0
- package/lib/migrations/015-manager-role-add-user-create.js +15 -0
- package/lib/migrations/015-manager-role-add-user-create.js.map +1 -0
- package/lib/migrations/016-set-feed-primary-secondary.d.ts +4 -0
- package/lib/migrations/016-set-feed-primary-secondary.d.ts.map +1 -0
- package/lib/migrations/016-set-feed-primary-secondary.js +36 -0
- package/lib/migrations/016-set-feed-primary-secondary.js.map +1 -0
- package/lib/migrations/017-make-layers-available.d.ts +4 -0
- package/lib/migrations/017-make-layers-available.d.ts.map +1 -0
- package/lib/migrations/017-make-layers-available.js +48 -0
- package/lib/migrations/017-make-layers-available.js.map +1 -0
- package/lib/migrations/018-feeds-admin-permissions.d.ts +4 -0
- package/lib/migrations/018-feeds-admin-permissions.d.ts.map +1 -0
- package/lib/migrations/018-feeds-admin-permissions.js +32 -0
- package/lib/migrations/018-feeds-admin-permissions.js.map +1 -0
- package/lib/migrations/018-set-default-password-policy.d.ts +4 -0
- package/lib/migrations/018-set-default-password-policy.d.ts.map +1 -0
- package/lib/migrations/018-set-default-password-policy.js +58 -0
- package/lib/migrations/018-set-default-password-policy.js.map +1 -0
- package/lib/migrations/019-move-user-authentication.d.ts +4 -0
- package/lib/migrations/019-move-user-authentication.d.ts.map +1 -0
- package/lib/migrations/019-move-user-authentication.js +68 -0
- package/lib/migrations/019-move-user-authentication.js.map +1 -0
- package/lib/migrations/020-add-export-permissions.d.ts +4 -0
- package/lib/migrations/020-add-export-permissions.d.ts.map +1 -0
- package/lib/migrations/020-add-export-permissions.js +36 -0
- package/lib/migrations/020-add-export-permissions.js.map +1 -0
- package/lib/migrations/022-copy-auth-from-config-to-db.d.ts +4 -0
- package/lib/migrations/022-copy-auth-from-config-to-db.d.ts.map +1 -0
- package/lib/migrations/022-copy-auth-from-config-to-db.js +86 -0
- package/lib/migrations/022-copy-auth-from-config-to-db.js.map +1 -0
- package/lib/migrations/023-move-local-auth-from-settings.d.ts +4 -0
- package/lib/migrations/023-move-local-auth-from-settings.d.ts.map +1 -0
- package/lib/migrations/023-move-local-auth-from-settings.js +54 -0
- package/lib/migrations/023-move-local-auth-from-settings.js.map +1 -0
- package/lib/migrations/024-link-auth-to-auth-config.d.ts +4 -0
- package/lib/migrations/024-link-auth-to-auth-config.d.ts.map +1 -0
- package/lib/migrations/024-link-auth-to-auth-config.js +59 -0
- package/lib/migrations/024-link-auth-to-auth-config.js.map +1 -0
- package/lib/migrations/025-add-auth-config-permissions.d.ts +4 -0
- package/lib/migrations/025-add-auth-config-permissions.d.ts.map +1 -0
- package/lib/migrations/025-add-auth-config-permissions.js +32 -0
- package/lib/migrations/025-add-auth-config-permissions.js.map +1 -0
- package/lib/migrations/028-move-security-settings-to-secret-store.d.ts +4 -0
- package/lib/migrations/028-move-security-settings-to-secret-store.d.ts.map +1 -0
- package/lib/migrations/028-move-security-settings-to-secret-store.js +59 -0
- package/lib/migrations/028-move-security-settings-to-secret-store.js.map +1 -0
- package/lib/migrations/029-attachment-form-field.d.ts +4 -0
- package/lib/migrations/029-attachment-form-field.d.ts.map +1 -0
- package/lib/migrations/029-attachment-form-field.js +130 -0
- package/lib/migrations/029-attachment-form-field.js.map +1 -0
- package/lib/models/authentication.d.ts +17 -0
- package/lib/models/authentication.d.ts.map +1 -0
- package/lib/models/authentication.js +174 -0
- package/lib/models/authentication.js.map +1 -0
- package/lib/models/authenticationconfiguration.d.ts +15 -0
- package/lib/models/authenticationconfiguration.d.ts.map +1 -0
- package/lib/models/authenticationconfiguration.js +105 -0
- package/lib/models/authenticationconfiguration.js.map +1 -0
- package/lib/models/cappedLocation.d.ts +8 -0
- package/lib/models/cappedLocation.d.ts.map +1 -0
- package/lib/models/cappedLocation.js +78 -0
- package/lib/models/cappedLocation.js.map +1 -0
- package/lib/models/counter.d.ts +3 -0
- package/lib/models/counter.d.ts.map +1 -0
- package/lib/models/counter.js +37 -0
- package/lib/models/counter.js.map +1 -0
- package/lib/models/device.d.ts +14 -0
- package/lib/models/device.d.ts.map +1 -0
- package/lib/models/device.js +220 -0
- package/lib/models/device.js.map +1 -0
- package/lib/models/event.d.ts +75 -0
- package/lib/models/event.d.ts.map +1 -0
- package/lib/models/event.js +839 -0
- package/lib/models/event.js.map +1 -0
- package/lib/models/export.d.ts +18 -0
- package/lib/models/export.d.ts.map +1 -0
- package/lib/models/export.js +107 -0
- package/lib/models/export.js.map +1 -0
- package/lib/models/feature.d.ts +4 -0
- package/lib/models/feature.d.ts.map +1 -0
- package/lib/models/feature.js +43 -0
- package/lib/models/feature.js.map +1 -0
- package/lib/models/icon.d.ts +9 -0
- package/lib/models/icon.d.ts.map +1 -0
- package/lib/models/icon.js +69 -0
- package/lib/models/icon.js.map +1 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/index.d.ts.map +1 -0
- package/lib/models/index.js +12 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/layer.d.ts +13 -0
- package/lib/models/layer.d.ts.map +1 -0
- package/lib/models/layer.js +149 -0
- package/lib/models/layer.js.map +1 -0
- package/lib/models/location.d.ts +8 -0
- package/lib/models/location.d.ts.map +1 -0
- package/lib/models/location.js +96 -0
- package/lib/models/location.js.map +1 -0
- package/lib/models/login.d.ts +4 -0
- package/lib/models/login.d.ts.map +1 -0
- package/lib/models/login.js +90 -0
- package/lib/models/login.js.map +1 -0
- package/lib/models/observation.d.ts +93 -0
- package/lib/models/observation.d.ts.map +1 -0
- package/lib/models/observation.js +461 -0
- package/lib/models/observation.js.map +1 -0
- package/lib/models/role.d.ts +22 -0
- package/lib/models/role.d.ts.map +1 -0
- package/lib/models/role.js +80 -0
- package/lib/models/role.js.map +1 -0
- package/lib/models/setting.d.ts +6 -0
- package/lib/models/setting.d.ts.map +1 -0
- package/lib/models/setting.js +31 -0
- package/lib/models/setting.js.map +1 -0
- package/lib/models/team.d.ts +31 -0
- package/lib/models/team.d.ts.map +1 -0
- package/lib/models/team.js +511 -0
- package/lib/models/team.js.map +1 -0
- package/lib/models/token.d.ts +6 -0
- package/lib/models/token.d.ts.map +1 -0
- package/lib/models/token.js +68 -0
- package/lib/models/token.js.map +1 -0
- package/lib/models/user.d.ts +60 -0
- package/lib/models/user.d.ts.map +1 -0
- package/lib/models/user.js +400 -0
- package/lib/models/user.js.map +1 -0
- package/lib/permissions/permissions.events.d.ts +69 -0
- package/lib/permissions/permissions.events.d.ts.map +1 -0
- package/lib/permissions/permissions.events.js +154 -0
- package/lib/permissions/permissions.events.js.map +1 -0
- package/lib/permissions/permissions.feeds.d.ts +19 -0
- package/lib/permissions/permissions.feeds.d.ts.map +1 -0
- package/lib/permissions/permissions.feeds.js +58 -0
- package/lib/permissions/permissions.feeds.js.map +1 -0
- package/lib/permissions/permissions.icons.d.ts +9 -0
- package/lib/permissions/permissions.icons.d.ts.map +1 -0
- package/lib/permissions/permissions.icons.js +28 -0
- package/lib/permissions/permissions.icons.js.map +1 -0
- package/lib/permissions/permissions.observations.d.ts +14 -0
- package/lib/permissions/permissions.observations.d.ts.map +1 -0
- package/lib/permissions/permissions.observations.js +113 -0
- package/lib/permissions/permissions.observations.js.map +1 -0
- package/lib/permissions/permissions.role-based.base.d.ts +15 -0
- package/lib/permissions/permissions.role-based.base.d.ts.map +1 -0
- package/lib/permissions/permissions.role-based.base.js +14 -0
- package/lib/permissions/permissions.role-based.base.js.map +1 -0
- package/lib/permissions/permissions.users.d.ts +8 -0
- package/lib/permissions/permissions.users.d.ts.map +1 -0
- package/lib/permissions/permissions.users.js +23 -0
- package/lib/permissions/permissions.users.js.map +1 -0
- package/lib/plugins.api/index.d.ts +55 -0
- package/lib/plugins.api/index.d.ts.map +1 -0
- package/lib/plugins.api/index.js +5 -0
- package/lib/plugins.api/index.js.map +1 -0
- package/lib/plugins.api/plugins.api.db.d.ts +7 -0
- package/lib/plugins.api/plugins.api.db.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.db.js +5 -0
- package/lib/plugins.api/plugins.api.db.js.map +1 -0
- package/lib/plugins.api/plugins.api.events.d.ts +24 -0
- package/lib/plugins.api/plugins.api.events.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.events.js +5 -0
- package/lib/plugins.api/plugins.api.events.js.map +1 -0
- package/lib/plugins.api/plugins.api.feeds.d.ts +35 -0
- package/lib/plugins.api/plugins.api.feeds.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.feeds.js +12 -0
- package/lib/plugins.api/plugins.api.feeds.js.map +1 -0
- package/lib/plugins.api/plugins.api.icons.d.ts +21 -0
- package/lib/plugins.api/plugins.api.icons.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.icons.js +5 -0
- package/lib/plugins.api/plugins.api.icons.js.map +1 -0
- package/lib/plugins.api/plugins.api.observations.d.ts +10 -0
- package/lib/plugins.api/plugins.api.observations.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.observations.js +11 -0
- package/lib/plugins.api/plugins.api.observations.js.map +1 -0
- package/lib/plugins.api/plugins.api.users.d.ts +4 -0
- package/lib/plugins.api/plugins.api.users.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.users.js +5 -0
- package/lib/plugins.api/plugins.api.users.js.map +1 -0
- package/lib/plugins.api/plugins.api.web.d.ts +10 -0
- package/lib/plugins.api/plugins.api.web.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.web.js +3 -0
- package/lib/plugins.api/plugins.api.web.js.map +1 -0
- package/lib/provision/index.d.ts +23 -0
- package/lib/provision/index.d.ts.map +1 -0
- package/lib/provision/index.js +60 -0
- package/lib/provision/index.js.map +1 -0
- package/lib/provision/none.d.ts +3 -0
- package/lib/provision/none.d.ts.map +1 -0
- package/lib/provision/none.js +41 -0
- package/lib/provision/none.js.map +1 -0
- package/lib/provision/strategies/none.d.ts +9 -0
- package/lib/provision/strategies/none.d.ts.map +1 -0
- package/lib/provision/strategies/none.js +25 -0
- package/lib/provision/strategies/none.js.map +1 -0
- package/lib/provision/strategies/uid.d.ts +9 -0
- package/lib/provision/strategies/uid.d.ts.map +1 -0
- package/lib/provision/strategies/uid.js +28 -0
- package/lib/provision/strategies/uid.js.map +1 -0
- package/lib/provision/uid.d.ts +3 -0
- package/lib/provision/uid.d.ts.map +1 -0
- package/lib/provision/uid.js +43 -0
- package/lib/provision/uid.js.map +1 -0
- package/lib/routes/authenticationconfigurations.d.ts +3 -0
- package/lib/routes/authenticationconfigurations.d.ts.map +1 -0
- package/lib/routes/authenticationconfigurations.js +209 -0
- package/lib/routes/authenticationconfigurations.js.map +1 -0
- package/lib/routes/devices.d.ts +3 -0
- package/lib/routes/devices.d.ts.map +1 -0
- package/lib/routes/devices.js +201 -0
- package/lib/routes/devices.js.map +1 -0
- package/lib/routes/events.d.ts +47 -0
- package/lib/routes/events.d.ts.map +1 -0
- package/lib/routes/events.js +495 -0
- package/lib/routes/events.js.map +1 -0
- package/lib/routes/exports.d.ts +3 -0
- package/lib/routes/exports.d.ts.map +1 -0
- package/lib/routes/exports.js +204 -0
- package/lib/routes/exports.js.map +1 -0
- package/lib/routes/imports.d.ts +3 -0
- package/lib/routes/imports.d.ts.map +1 -0
- package/lib/routes/imports.js +41 -0
- package/lib/routes/imports.js.map +1 -0
- package/lib/routes/index.d.ts +3 -0
- package/lib/routes/index.d.ts.map +1 -0
- package/lib/routes/index.js +151 -0
- package/lib/routes/index.js.map +1 -0
- package/lib/routes/layers.d.ts +3 -0
- package/lib/routes/layers.d.ts.map +1 -0
- package/lib/routes/layers.js +433 -0
- package/lib/routes/layers.js.map +1 -0
- package/lib/routes/locations.d.ts +3 -0
- package/lib/routes/locations.d.ts.map +1 -0
- package/lib/routes/locations.js +124 -0
- package/lib/routes/locations.js.map +1 -0
- package/lib/routes/logins.d.ts +3 -0
- package/lib/routes/logins.d.ts.map +1 -0
- package/lib/routes/logins.js +64 -0
- package/lib/routes/logins.js.map +1 -0
- package/lib/routes/observations.d.ts +3 -0
- package/lib/routes/observations.d.ts.map +1 -0
- package/lib/routes/observations.js +363 -0
- package/lib/routes/observations.js.map +1 -0
- package/lib/routes/plugins.d.ts +3 -0
- package/lib/routes/plugins.d.ts.map +1 -0
- package/lib/routes/plugins.js +29 -0
- package/lib/routes/plugins.js.map +1 -0
- package/lib/routes/roles.d.ts +3 -0
- package/lib/routes/roles.d.ts.map +1 -0
- package/lib/routes/roles.js +64 -0
- package/lib/routes/roles.js.map +1 -0
- package/lib/routes/settings.d.ts +3 -0
- package/lib/routes/settings.d.ts.map +1 -0
- package/lib/routes/settings.js +21 -0
- package/lib/routes/settings.js.map +1 -0
- package/lib/routes/setup.d.ts +3 -0
- package/lib/routes/setup.d.ts.map +1 -0
- package/lib/routes/setup.js +90 -0
- package/lib/routes/setup.js.map +1 -0
- package/lib/routes/teams.d.ts +3 -0
- package/lib/routes/teams.d.ts.map +1 -0
- package/lib/routes/teams.js +213 -0
- package/lib/routes/teams.js.map +1 -0
- package/lib/routes/users.d.ts +3 -0
- package/lib/routes/users.d.ts.map +1 -0
- package/lib/routes/users.js +478 -0
- package/lib/routes/users.js.map +1 -0
- package/lib/schedule/export/export-task.d.ts +14 -0
- package/lib/schedule/export/export-task.d.ts.map +1 -0
- package/lib/schedule/export/export-task.js +70 -0
- package/lib/schedule/export/export-task.js.map +1 -0
- package/lib/schedule/index.d.ts +2 -0
- package/lib/schedule/index.d.ts.map +1 -0
- package/lib/schedule/index.js +27 -0
- package/lib/schedule/index.js.map +1 -0
- package/lib/security/key-mgt/key-mgt-factory.d.ts +7 -0
- package/lib/security/key-mgt/key-mgt-factory.d.ts.map +1 -0
- package/lib/security/key-mgt/key-mgt-factory.js +10 -0
- package/lib/security/key-mgt/key-mgt-factory.js.map +1 -0
- package/lib/security/key-mgt/plaintext-key-manager.d.ts +42 -0
- package/lib/security/key-mgt/plaintext-key-manager.d.ts.map +1 -0
- package/lib/security/key-mgt/plaintext-key-manager.js +52 -0
- package/lib/security/key-mgt/plaintext-key-manager.js.map +1 -0
- package/lib/security/responses/data-response.d.ts +13 -0
- package/lib/security/responses/data-response.d.ts.map +1 -0
- package/lib/security/responses/data-response.js +25 -0
- package/lib/security/responses/data-response.js.map +1 -0
- package/lib/security/secret-store-service.d.ts +39 -0
- package/lib/security/secret-store-service.d.ts.map +1 -0
- package/lib/security/secret-store-service.js +94 -0
- package/lib/security/secret-store-service.js.map +1 -0
- package/lib/security/storage/file-system-secret-store.d.ts +17 -0
- package/lib/security/storage/file-system-secret-store.d.ts.map +1 -0
- package/lib/security/storage/file-system-secret-store.js +46 -0
- package/lib/security/storage/file-system-secret-store.js.map +1 -0
- package/lib/security/storage/json-provider.d.ts +6 -0
- package/lib/security/storage/json-provider.d.ts.map +1 -0
- package/lib/security/storage/json-provider.js +17 -0
- package/lib/security/storage/json-provider.js.map +1 -0
- package/lib/security/utilities/secure-property-appender.d.ts +8 -0
- package/lib/security/utilities/secure-property-appender.d.ts.map +1 -0
- package/lib/security/utilities/secure-property-appender.js +39 -0
- package/lib/security/utilities/secure-property-appender.js.map +1 -0
- package/lib/transformers/authenticationconfiguration.d.ts +2 -0
- package/lib/transformers/authenticationconfiguration.d.ts.map +1 -0
- package/lib/transformers/authenticationconfiguration.js +22 -0
- package/lib/transformers/authenticationconfiguration.js.map +1 -0
- package/lib/transformers/export.d.ts +2 -0
- package/lib/transformers/export.d.ts.map +1 -0
- package/lib/transformers/export.js +13 -0
- package/lib/transformers/export.js.map +1 -0
- package/lib/transformers/geojson.d.ts +2 -0
- package/lib/transformers/geojson.d.ts.map +1 -0
- package/lib/transformers/geojson.js +24 -0
- package/lib/transformers/geojson.js.map +1 -0
- package/lib/transformers/layer.d.ts +2 -0
- package/lib/transformers/layer.d.ts.map +1 -0
- package/lib/transformers/layer.js +13 -0
- package/lib/transformers/layer.js.map +1 -0
- package/lib/transformers/observation.d.ts +2 -0
- package/lib/transformers/observation.d.ts.map +1 -0
- package/lib/transformers/observation.js +13 -0
- package/lib/transformers/observation.js.map +1 -0
- package/lib/transformers/pageinfo.d.ts +2 -0
- package/lib/transformers/pageinfo.d.ts.map +1 -0
- package/lib/transformers/pageinfo.js +27 -0
- package/lib/transformers/pageinfo.js.map +1 -0
- package/lib/transformers/user.d.ts +2 -0
- package/lib/transformers/user.d.ts.map +1 -0
- package/lib/transformers/user.js +21 -0
- package/lib/transformers/user.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/upload.d.ts +8 -0
- package/lib/upload.d.ts.map +1 -0
- package/lib/upload.js +30 -0
- package/lib/upload.js.map +1 -0
- package/lib/utilities/authenticationApiAppender.d.ts +10 -0
- package/lib/utilities/authenticationApiAppender.d.ts.map +1 -0
- package/lib/utilities/authenticationApiAppender.js +48 -0
- package/lib/utilities/authenticationApiAppender.js.map +1 -0
- package/lib/utilities/filterParser.d.ts +2 -0
- package/lib/utilities/filterParser.d.ts.map +1 -0
- package/lib/utilities/filterParser.js +87 -0
- package/lib/utilities/filterParser.js.map +1 -0
- package/lib/utilities/geopackage.d.ts +56 -0
- package/lib/utilities/geopackage.d.ts.map +1 -0
- package/lib/utilities/geopackage.js +335 -0
- package/lib/utilities/geopackage.js.map +1 -0
- package/lib/utilities/loader.d.ts +9 -0
- package/lib/utilities/loader.d.ts.map +1 -0
- package/lib/utilities/loader.js +25 -0
- package/lib/utilities/loader.js.map +1 -0
- package/lib/utilities/paging.d.ts +15 -0
- package/lib/utilities/paging.d.ts.map +1 -0
- package/lib/utilities/paging.js +56 -0
- package/lib/utilities/paging.js.map +1 -0
- package/lib/utilities/passwordValidator.d.ts +8 -0
- package/lib/utilities/passwordValidator.d.ts.map +1 -0
- package/lib/utilities/passwordValidator.js +175 -0
- package/lib/utilities/passwordValidator.js.map +1 -0
- package/lib/utilities/pbkdf2.d.ts +6 -0
- package/lib/utilities/pbkdf2.d.ts.map +1 -0
- package/lib/utilities/pbkdf2.js +79 -0
- package/lib/utilities/pbkdf2.js.map +1 -0
- package/lib/utilities/togeojson.d.ts +2 -0
- package/lib/utilities/togeojson.d.ts.map +1 -0
- package/lib/utilities/togeojson.js +308 -0
- package/lib/utilities/togeojson.js.map +1 -0
- package/lib/utilities/waitForMongooseConnection.d.ts +3 -0
- package/lib/utilities/waitForMongooseConnection.d.ts.map +1 -0
- package/lib/utilities/waitForMongooseConnection.js +34 -0
- package/lib/utilities/waitForMongooseConnection.js.map +1 -0
- package/lib/utilities/whitelist.d.ts +2 -0
- package/lib/utilities/whitelist.d.ts.map +1 -0
- package/lib/utilities/whitelist.js +18 -0
- package/lib/utilities/whitelist.js.map +1 -0
- package/lib/views/authentication.pug +10 -0
- package/lib/views/oauth.pug +12 -0
- package/lib/views/observation.pug +137 -0
- package/package.json +203 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const crypto = require('crypto'), verification = require('./verification'), api = require('../api/'), config = require('../config.js'), log = require('../logger'), userTransformer = require('../transformers/user'), authenticationApiAppender = require('../utilities/authenticationApiAppender'), AuthenticationConfiguration = require('../models/authenticationconfiguration'), SecurePropertyAppender = require('../security/utilities/secure-property-appender');
|
|
3
|
+
const JWTService = verification.JWTService;
|
|
4
|
+
const TokenAssertion = verification.TokenAssertion;
|
|
5
|
+
class AuthenticationInitializer {
|
|
6
|
+
static initialize(app, passport, provision) {
|
|
7
|
+
AuthenticationInitializer.app = app;
|
|
8
|
+
AuthenticationInitializer.passport = passport;
|
|
9
|
+
AuthenticationInitializer.provision = provision;
|
|
10
|
+
const BearerStrategy = require('passport-http-bearer').Strategy, User = require('../models/user'), Token = require('../models/token');
|
|
11
|
+
passport.serializeUser(function (user, done) {
|
|
12
|
+
done(null, user._id);
|
|
13
|
+
});
|
|
14
|
+
passport.deserializeUser(function (id, done) {
|
|
15
|
+
User.getUserById(id, function (err, user) {
|
|
16
|
+
done(err, user);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
passport.use(new BearerStrategy({
|
|
20
|
+
passReqToCallback: true
|
|
21
|
+
}, function (req, token, done) {
|
|
22
|
+
Token.getToken(token, function (err, credentials) {
|
|
23
|
+
if (err) {
|
|
24
|
+
return done(err);
|
|
25
|
+
}
|
|
26
|
+
if (!credentials || !credentials.user) {
|
|
27
|
+
return done(null, false);
|
|
28
|
+
}
|
|
29
|
+
req.token = credentials.token;
|
|
30
|
+
if (credentials.token.deviceId) {
|
|
31
|
+
req.provisionedDeviceId = credentials.token.deviceId;
|
|
32
|
+
}
|
|
33
|
+
return done(null, credentials.user, { scope: 'all' });
|
|
34
|
+
});
|
|
35
|
+
}));
|
|
36
|
+
passport.use('authorization', new BearerStrategy(function (token, done) {
|
|
37
|
+
const expectation = {
|
|
38
|
+
assertion: TokenAssertion.Authorized
|
|
39
|
+
};
|
|
40
|
+
AuthenticationInitializer.tokenService.verifyToken(token, expectation)
|
|
41
|
+
.then(payload => {
|
|
42
|
+
User.getUserById(payload.subject)
|
|
43
|
+
.then(user => done(null, user))
|
|
44
|
+
.catch(err => done(err));
|
|
45
|
+
})
|
|
46
|
+
.catch(err => done(err));
|
|
47
|
+
}));
|
|
48
|
+
function authorize(req, res, next) {
|
|
49
|
+
passport.authenticate('authorization', function (err, user, info = {}) {
|
|
50
|
+
if (!user)
|
|
51
|
+
return res.status(401).send(info.message);
|
|
52
|
+
req.user = user;
|
|
53
|
+
next();
|
|
54
|
+
})(req, res, next);
|
|
55
|
+
}
|
|
56
|
+
function provisionDevice(req, res, next) {
|
|
57
|
+
provision.check(req.user.authentication.authenticationConfiguration.type, req.user.authentication.authenticationConfiguration.name)(req, res, next);
|
|
58
|
+
}
|
|
59
|
+
app.post('/auth/token', authorize, provisionDevice, function (req, res, next) {
|
|
60
|
+
const options = {
|
|
61
|
+
userAgent: req.headers['user-agent'],
|
|
62
|
+
appVersion: req.param('appVersion')
|
|
63
|
+
};
|
|
64
|
+
new api.User().login(req.user, req.provisionedDevice, options, function (err, token) {
|
|
65
|
+
if (err)
|
|
66
|
+
return next(err);
|
|
67
|
+
authenticationApiAppender.append(config.api).then(api => {
|
|
68
|
+
res.json({
|
|
69
|
+
token: token.token,
|
|
70
|
+
expirationDate: token.expirationDate,
|
|
71
|
+
user: userTransformer.transform(req.user, { path: req.getRoot() }),
|
|
72
|
+
device: req.provisionedDevice,
|
|
73
|
+
api: api
|
|
74
|
+
});
|
|
75
|
+
}).catch(err => {
|
|
76
|
+
next(err);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
req.session = null;
|
|
80
|
+
});
|
|
81
|
+
AuthenticationConfiguration.getAllConfigurations().then(configs => {
|
|
82
|
+
configs.forEach(config => {
|
|
83
|
+
const strategy = require('../authentication/' + config.type);
|
|
84
|
+
SecurePropertyAppender.appendToConfig(config).then(appendedConfig => {
|
|
85
|
+
strategy.initialize(appendedConfig);
|
|
86
|
+
}).catch(err => {
|
|
87
|
+
log.error(err);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
}).catch(err => {
|
|
91
|
+
log.warn(err);
|
|
92
|
+
});
|
|
93
|
+
//TODO due to a timing issue on startup, local may not yet be configured during setup phase
|
|
94
|
+
//For now, always load it (even though it may have already be loaded above)
|
|
95
|
+
require('./local').initialize();
|
|
96
|
+
require('./anonymous').initialize();
|
|
97
|
+
return {
|
|
98
|
+
passport: passport
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
AuthenticationInitializer.tokenService = new JWTService(crypto.randomBytes(64).toString('hex'), 'urn:mage');
|
|
103
|
+
module.exports = AuthenticationInitializer;
|
|
104
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/authentication/index.js"],"names":[],"mappings":";AAAA,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,EAC5B,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC,EACxC,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,EACxB,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,EAChC,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,EAC1B,eAAe,GAAG,OAAO,CAAC,sBAAsB,CAAC,EACjD,yBAAyB,GAAG,OAAO,CAAC,wCAAwC,CAAC,EAC7E,2BAA2B,GAAG,OAAO,CAAC,uCAAuC,CAAC,EAC9E,sBAAsB,GAAG,OAAO,CAAC,gDAAgD,CAAC,CAAC;AAEvF,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC;AAC3C,MAAM,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC;AAEnD,MAAM,yBAAyB;IAM7B,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,EAAE,SAAS;QACxC,yBAAyB,CAAC,GAAG,GAAG,GAAG,CAAC;QACpC,yBAAyB,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC9C,yBAAyB,CAAC,SAAS,GAAG,SAAS,CAAC;QAEhD,MAAM,cAAc,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC,QAAQ,EAC3D,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,EAChC,KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;QAEvC,QAAQ,CAAC,aAAa,CAAC,UAAU,IAAI,EAAE,IAAI;YACzC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC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K,CAAC,GAAG,CAAC,EAAE;oBACb,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACjB,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACb,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,2FAA2F;QAC3F,2EAA2E;QAC3E,OAAO,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;QAChC,OAAO,CAAC,aAAa,CAAC,CAAC,UAAU,EAAE,CAAC;QAEpC,OAAO;YACL,QAAQ,EAAE,QAAQ;SACnB,CAAC;IACJ,CAAC;;AA1HM,sCAAY,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;AA6H3F,MAAM,CAAC,OAAO,GAAG,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ldap.d.ts","sourceRoot":"","sources":["../../src/authentication/ldap.js"],"names":[],"mappings":"AA0FA,gDAqDC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const LdapStrategy = require('passport-ldapauth'), log = require('winston'), User = require('../models/user'), Role = require('../models/role'), TokenAssertion = require('./verification').TokenAssertion, api = require('../api'), userTransformer = require('../transformers/user'), { app, passport, tokenService } = require('./index');
|
|
3
|
+
function configure(strategy) {
|
|
4
|
+
log.info('Configuring ' + strategy.title + ' authentication');
|
|
5
|
+
passport.use(strategy.name, new LdapStrategy({
|
|
6
|
+
server: {
|
|
7
|
+
url: strategy.settings.url,
|
|
8
|
+
bindDN: strategy.settings.bindDN,
|
|
9
|
+
bindCredentials: strategy.settings.bindCredentials,
|
|
10
|
+
searchBase: strategy.settings.searchBase,
|
|
11
|
+
searchFilter: strategy.settings.searchFilter,
|
|
12
|
+
searchScope: strategy.settings.searchScope,
|
|
13
|
+
groupSearchBase: strategy.settings.groupSearchBase,
|
|
14
|
+
groupSearchFilter: strategy.settings.groupSearchFilter,
|
|
15
|
+
groupSearchScope: strategy.settings.groupSearchScope,
|
|
16
|
+
bindProperty: strategy.settings.bindProperty,
|
|
17
|
+
groupDnProperty: strategy.settings.groupDnProperty
|
|
18
|
+
}
|
|
19
|
+
}, function (profile, done) {
|
|
20
|
+
const username = profile[strategy.settings.profile.id];
|
|
21
|
+
User.getUserByAuthenticationStrategy(strategy.type, username, function (err, user) {
|
|
22
|
+
if (err)
|
|
23
|
+
return done(err);
|
|
24
|
+
if (!user) {
|
|
25
|
+
// Create an account for the user
|
|
26
|
+
Role.getRole('USER_ROLE', function (err, role) {
|
|
27
|
+
if (err)
|
|
28
|
+
return done(err);
|
|
29
|
+
const user = {
|
|
30
|
+
username: username,
|
|
31
|
+
displayName: profile[strategy.settings.profile.displayName],
|
|
32
|
+
email: profile[strategy.settings.profile.email],
|
|
33
|
+
active: false,
|
|
34
|
+
roleId: role._id,
|
|
35
|
+
authentication: {
|
|
36
|
+
type: strategy.name,
|
|
37
|
+
id: username,
|
|
38
|
+
authenticationConfiguration: {
|
|
39
|
+
name: strategy.name
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
new api.User().create(user).then(newUser => {
|
|
44
|
+
if (!newUser.authentication.authenticationConfiguration.enabled) {
|
|
45
|
+
log.warn(newUser.authentication.authenticationConfiguration.title + " authentication is not enabled");
|
|
46
|
+
return done(null, newUser, { message: 'Authentication method is not enabled, please contact a MAGE administrator for assistance.' });
|
|
47
|
+
}
|
|
48
|
+
if (newUser.active) {
|
|
49
|
+
done(null, newUser);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
done(null, newUser, { status: 403 });
|
|
53
|
+
}
|
|
54
|
+
}).catch(err => done(err));
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
else if (!user.authentication.authenticationConfiguration.enabled) {
|
|
58
|
+
log.warn(user.authentication.authenticationConfiguration.title + " authentication is not enabled");
|
|
59
|
+
return done(null, user, { message: 'Authentication method is not enabled, please contact a MAGE administrator for assistance.' });
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
return done(null, user);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
function setDefaults(strategy) {
|
|
68
|
+
if (!strategy.settings.profile) {
|
|
69
|
+
strategy.settings.profile = {};
|
|
70
|
+
}
|
|
71
|
+
if (!strategy.settings.profile.displayName) {
|
|
72
|
+
strategy.settings.profile.displayName = 'givenname';
|
|
73
|
+
}
|
|
74
|
+
if (!strategy.settings.profile.email) {
|
|
75
|
+
strategy.settings.profile.email = 'mail';
|
|
76
|
+
}
|
|
77
|
+
if (!strategy.settings.profile.id) {
|
|
78
|
+
strategy.settings.profile.id = 'cn';
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function initialize(strategy) {
|
|
82
|
+
setDefaults(strategy);
|
|
83
|
+
configure(strategy);
|
|
84
|
+
const authenticationOptions = {
|
|
85
|
+
invalidLogonHours: `Not Permitted to login to ${strategy.title} account at this time.`,
|
|
86
|
+
invalidWorkstation: `Not permited to logon to ${strategy.title} account at this workstation.`,
|
|
87
|
+
passwordExpired: `${strategy.title} password expired.`,
|
|
88
|
+
accountDisabled: `${strategy.title} account disabled.`,
|
|
89
|
+
accountExpired: `${strategy.title} account expired.`,
|
|
90
|
+
passwordMustChange: `User must reset ${strategy.title} password.`,
|
|
91
|
+
accountLockedOut: `${strategy.title} user account locked.`,
|
|
92
|
+
invalidCredentials: `Invalid ${strategy.title} username/password.`
|
|
93
|
+
};
|
|
94
|
+
app.post(`/auth/${strategy.name}/signin`, function authenticate(req, res, next) {
|
|
95
|
+
passport.authenticate(strategy.name, authenticationOptions, function (err, user, info = {}) {
|
|
96
|
+
if (err)
|
|
97
|
+
return next(err);
|
|
98
|
+
if (!user) {
|
|
99
|
+
return res.status(401).send(info.message);
|
|
100
|
+
}
|
|
101
|
+
if (!user.active) {
|
|
102
|
+
return res.status(info.status || 401).send('User account is not approved, please contact your MAGE administrator to approve your account.');
|
|
103
|
+
}
|
|
104
|
+
if (!user.enabled) {
|
|
105
|
+
log.warn('Failed user login attempt: User ' + user.username + ' account is disabled.');
|
|
106
|
+
return res.status(401).send('Your account has been disabled, please contact a MAGE administrator for assistance.');
|
|
107
|
+
}
|
|
108
|
+
if (!user.authentication.authenticationConfigurationId) {
|
|
109
|
+
log.warn('Failed user login attempt: ' + user.authentication.type + ' is not configured');
|
|
110
|
+
return res.status(401).send(user.authentication.type + ' authentication is not configured, please contact a MAGE administrator for assistance.');
|
|
111
|
+
}
|
|
112
|
+
if (!user.authentication.authenticationConfiguration.enabled) {
|
|
113
|
+
log.warn('Failed user login attempt: Authentication ' + user.authentication.authenticationConfiguration.title + ' is disabled.');
|
|
114
|
+
return res.status(401).send(user.authentication.authenticationConfiguration.title + ' authentication is disabled, please contact a MAGE administrator for assistance.');
|
|
115
|
+
}
|
|
116
|
+
tokenService.generateToken(user._id.toString(), TokenAssertion.Authorized, 60 * 5)
|
|
117
|
+
.then(token => {
|
|
118
|
+
res.json({
|
|
119
|
+
user: userTransformer.transform(req.user, { path: req.getRoot() }),
|
|
120
|
+
token: token
|
|
121
|
+
});
|
|
122
|
+
}).catch(err => next(err));
|
|
123
|
+
})(req, res, next);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
;
|
|
127
|
+
module.exports = {
|
|
128
|
+
initialize
|
|
129
|
+
};
|
|
130
|
+
//# sourceMappingURL=ldap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ldap.js","sourceRoot":"","sources":["../../src/authentication/ldap.js"],"names":[],"mappings":";AAAA,MAAM,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC,EAC7C,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,EACxB,IA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AAC;QAC/B,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACrB,CAAC,CACF,CAAC;AACJ,CAAC;AAAA,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG;IACf,UAAU;CACX,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../src/authentication/local.js"],"names":[],"mappings":"AAkEA,mCAsBC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const log = require('winston'), moment = require('moment'), LocalStrategy = require('passport-local').Strategy, TokenAssertion = require('./verification').TokenAssertion, User = require('../models/user'), userTransformer = require('../transformers/user'), { app, passport, tokenService } = require('./index'), Authentication = require('../models/authentication');
|
|
3
|
+
function configure() {
|
|
4
|
+
log.info('Configuring local authentication');
|
|
5
|
+
passport.use(new LocalStrategy(function (username, password, done) {
|
|
6
|
+
User.getUserByUsername(username, function (err, user) {
|
|
7
|
+
if (err) {
|
|
8
|
+
return done(err);
|
|
9
|
+
}
|
|
10
|
+
if (!user) {
|
|
11
|
+
log.warn('Failed login attempt: User with username ' + username + ' not found');
|
|
12
|
+
return done(null, false, { message: 'Please check your username and password and try again.' });
|
|
13
|
+
}
|
|
14
|
+
if (!user.active) {
|
|
15
|
+
log.warn('Failed user login attempt: User ' + user.username + ' is not active');
|
|
16
|
+
return done(null, false, { message: 'User account is not approved, please contact your MAGE administrator to approve your account.' });
|
|
17
|
+
}
|
|
18
|
+
if (!user.enabled) {
|
|
19
|
+
log.warn('Failed user login attempt: User ' + user.username + ' account is disabled.');
|
|
20
|
+
return done(null, false, { message: 'Your account has been disabled, please contact a MAGE administrator for assistance.' });
|
|
21
|
+
}
|
|
22
|
+
const settings = user.authentication.security;
|
|
23
|
+
if (settings && settings.locked && moment().isBefore(moment(settings.lockedUntil))) {
|
|
24
|
+
log.warn('Failed user login attempt: User ' + user.username + ' account is locked until ' + settings.lockedUntil);
|
|
25
|
+
return done(null, false, { message: 'Your account has been temporarily locked, please try again later or contact a MAGE administrator for assistance.' });
|
|
26
|
+
}
|
|
27
|
+
if (!(user.authentication instanceof Authentication.Local)) {
|
|
28
|
+
log.warn(user.username + " is not a local account");
|
|
29
|
+
return done(null, false, { message: 'You do not have a local account, please contact a MAGE administrator for assistance.' });
|
|
30
|
+
}
|
|
31
|
+
if (!user.authentication.authenticationConfiguration.enabled) {
|
|
32
|
+
log.warn(user.authentication.authenticationConfiguration.title + " authentication is not enabled");
|
|
33
|
+
return done(null, false, { message: 'Authentication method is not enabled, please contact a MAGE administrator for assistance.' });
|
|
34
|
+
}
|
|
35
|
+
user.authentication.validatePassword(password, function (err, isValid) {
|
|
36
|
+
if (err)
|
|
37
|
+
return done(err);
|
|
38
|
+
if (isValid) {
|
|
39
|
+
User.validLogin(user)
|
|
40
|
+
.then(() => done(null, user))
|
|
41
|
+
.catch(err => done(err));
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
log.warn('Failed login attempt: User with username ' + username + ' provided an invalid password');
|
|
45
|
+
User.invalidLogin(user)
|
|
46
|
+
.then(() => done(null, false, { message: 'Please check your username and password and try again.' }))
|
|
47
|
+
.catch(err => done(err));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
function initialize() {
|
|
54
|
+
configure();
|
|
55
|
+
app.post('/auth/local/signin', function authenticate(req, res, next) {
|
|
56
|
+
passport.authenticate('local', function (err, user, info = {}) {
|
|
57
|
+
if (err)
|
|
58
|
+
return next(err);
|
|
59
|
+
if (!user)
|
|
60
|
+
return res.status(401).send(info.message);
|
|
61
|
+
tokenService.generateToken(user._id.toString(), TokenAssertion.Authorized, 60 * 5)
|
|
62
|
+
.then(token => {
|
|
63
|
+
res.json({
|
|
64
|
+
token: token,
|
|
65
|
+
user: userTransformer.transform(user, { path: req.getRoot() })
|
|
66
|
+
});
|
|
67
|
+
}).catch(err => {
|
|
68
|
+
next(err);
|
|
69
|
+
});
|
|
70
|
+
})(req, res, next);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
;
|
|
74
|
+
module.exports = {
|
|
75
|
+
initialize
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=local.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../src/authentication/local.js"],"names":[],"mappings":";AAAA,MAAM,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,EAC1B,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,EAC1B,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAClD,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,cAAc,EACzD,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,EAChC,eAAe,GAAG,OAAO,CAAC,sBAAsB,CAAC,EACjD,EAAE,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,EACpD,cAAc,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;AAEzD,SAAS,SAAS;IAChB,GAAG,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;IAC7C,QAAQ,CAAC,GAAG,CAAC,IAAI,aAAa,CAC5B,UAAU,QAAQ,EAAE,QAAQ,EAAE,IAAI;QAChC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,UAAU,GAAG,EAAE,IAAI;YAClD,IAAI,GAAG,EAAE;gBAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;aAAE;YAE9B,IAAI,CAAC,IAAI,EAAE;gBACT,GAAG,CAAC,IAAI,CAAC,2CAA2C,GAAG,QAAQ,GAAG,YAAY,CAAC,CAAC;gBAChF,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,wDAAwD,EAAE,CAAC,CAAC;aACjG;YAED,IAAI,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GAAG,CAAC,CAAC;YAE1B,IAAI,CAAC,IAAI;gBAAE,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAErD,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,cAAc,CAAC,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC;iBAC/E,IAAI,CAAC,KAAK,CAAC,EAAE;gBACZ,GAAG,CAAC,IAAI,CAAC;oBACP,KAAK,EAAE,KAAK;oBACZ,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC;iBAC/D,CAAC,CAAC;YACL,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;gBACb,IAAI,CAAC,GAAG,CAAC,CAAC;YACZ,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACrB,CAAC,CACF,CAAC;AACJ,CAAC;AAAA,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG;IACf,UAAU;CACX,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/authentication/oauth.js"],"names":[],"mappings":"AAmJA,gDAuEC"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const OAuth2Strategy = require('passport-oauth2').Strategy, TokenAssertion = require('./verification').TokenAssertion, base64 = require('base-64'), api = require('../api'), log = require('../logger'), User = require('../models/user'), Role = require('../models/role'), { app, passport, tokenService } = require('./index');
|
|
3
|
+
class OAuth2ProfileStrategy extends OAuth2Strategy {
|
|
4
|
+
constructor(options, verify) {
|
|
5
|
+
super(options, verify);
|
|
6
|
+
if (!options.profileURL) {
|
|
7
|
+
throw new TypeError('OAuth2Strategy requires a profileURL option');
|
|
8
|
+
}
|
|
9
|
+
this._profileURL = options.profileURL;
|
|
10
|
+
this._oauth2.useAuthorizationHeaderforGET(true);
|
|
11
|
+
}
|
|
12
|
+
userProfile(accessToken, done) {
|
|
13
|
+
this._oauth2.get(this._profileURL, accessToken, function (err, body) {
|
|
14
|
+
if (err) {
|
|
15
|
+
return done(new InternalOAuthError('Failed to fetch user profile', err));
|
|
16
|
+
}
|
|
17
|
+
try {
|
|
18
|
+
const json = JSON.parse(body);
|
|
19
|
+
const profile = {};
|
|
20
|
+
profile.provider = 'oauth2';
|
|
21
|
+
profile.raw = body;
|
|
22
|
+
profile.json = json;
|
|
23
|
+
done(null, profile);
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
log.warn('Error parsing oauth profile', e);
|
|
27
|
+
done(e);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function configure(strategy) {
|
|
33
|
+
log.info('Configuring ' + strategy.title + ' authentication');
|
|
34
|
+
let customHeaders = null;
|
|
35
|
+
if (strategy.settings.headers) {
|
|
36
|
+
customHeaders = {};
|
|
37
|
+
if (strategy.settings.headers.basic) {
|
|
38
|
+
customHeaders['Authorization'] = `Basic ${base64.encode(`${strategy.settings.clientID}:${strategy.settings.clientSecret}`)}`;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
passport.use(strategy.name, new OAuth2ProfileStrategy({
|
|
42
|
+
clientID: strategy.settings.clientID,
|
|
43
|
+
clientSecret: strategy.settings.clientSecret,
|
|
44
|
+
callbackURL: `/auth/${strategy.name}/callback`,
|
|
45
|
+
authorizationURL: strategy.settings.authorizationURL,
|
|
46
|
+
tokenURL: strategy.settings.tokenURL,
|
|
47
|
+
profileURL: strategy.settings.profileURL,
|
|
48
|
+
customHeaders: customHeaders,
|
|
49
|
+
scope: strategy.settings.scope,
|
|
50
|
+
pkce: strategy.settings.pkce,
|
|
51
|
+
store: true
|
|
52
|
+
}, function (accessToken, refreshToken, profileResponse, done) {
|
|
53
|
+
const profile = profileResponse.json;
|
|
54
|
+
if (!profile[strategy.settings.profile.id]) {
|
|
55
|
+
log.warn("JSON: " + JSON.stringify(profile) + " RAW: " + profileResponse.raw);
|
|
56
|
+
return done(`OAuth2 user profile does not contain id property named ${strategy.settings.profile.id}`);
|
|
57
|
+
}
|
|
58
|
+
const profileId = profile[strategy.settings.profile.id];
|
|
59
|
+
User.getUserByAuthenticationStrategy(strategy.type, profileId, function (err, user) {
|
|
60
|
+
if (err)
|
|
61
|
+
return done(err);
|
|
62
|
+
if (!user) {
|
|
63
|
+
// Create an account for the user
|
|
64
|
+
Role.getRole('USER_ROLE', function (err, role) {
|
|
65
|
+
if (err)
|
|
66
|
+
return done(err);
|
|
67
|
+
let email = null;
|
|
68
|
+
if (profile[strategy.settings.profile.email]) {
|
|
69
|
+
if (Array.isArray(profile[strategy.settings.profile.email])) {
|
|
70
|
+
email = profile[strategy.settings.profile.email].find(email => {
|
|
71
|
+
email.verified === true;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
email = profile[strategy.settings.profile.email];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
log.warn(`OAuth2 user profile does not contain email property named ${strategy.settings.profile.email}`);
|
|
80
|
+
log.debug(JSON.stringify(profile));
|
|
81
|
+
}
|
|
82
|
+
const user = {
|
|
83
|
+
username: profileId,
|
|
84
|
+
displayName: profile[strategy.settings.profile.displayName] || profileId,
|
|
85
|
+
email: email,
|
|
86
|
+
active: false,
|
|
87
|
+
roleId: role._id,
|
|
88
|
+
authentication: {
|
|
89
|
+
type: strategy.type,
|
|
90
|
+
id: profileId,
|
|
91
|
+
authenticationConfiguration: {
|
|
92
|
+
name: strategy.name
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
new api.User().create(user).then(newUser => {
|
|
97
|
+
if (!newUser.authentication.authenticationConfiguration.enabled) {
|
|
98
|
+
log.warn(newUser.authentication.authenticationConfiguration.title + " authentication is not enabled");
|
|
99
|
+
return done(null, false, { message: 'Authentication method is not enabled, please contact a MAGE administrator for assistance.' });
|
|
100
|
+
}
|
|
101
|
+
return done(null, newUser);
|
|
102
|
+
}).catch(err => done(err));
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
else if (!user.active) {
|
|
106
|
+
return done(null, user, { message: "User is not approved, please contact your MAGE administrator to approve your account." });
|
|
107
|
+
}
|
|
108
|
+
else if (!user.authentication.authenticationConfiguration.enabled) {
|
|
109
|
+
log.warn(user.authentication.authenticationConfiguration.title + " authentication is not enabled");
|
|
110
|
+
return done(null, user, { message: 'Authentication method is not enabled, please contact a MAGE administrator for assistance.' });
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
return done(null, user);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
function setDefaults(strategy) {
|
|
119
|
+
if (!strategy.settings.profile) {
|
|
120
|
+
strategy.settings.profile = {};
|
|
121
|
+
}
|
|
122
|
+
if (!strategy.settings.profile.displayName) {
|
|
123
|
+
strategy.settings.profile.displayName = 'displayName';
|
|
124
|
+
}
|
|
125
|
+
if (!strategy.settings.profile.email) {
|
|
126
|
+
strategy.settings.profile.email = 'email';
|
|
127
|
+
}
|
|
128
|
+
if (!strategy.settings.profile.id) {
|
|
129
|
+
strategy.settings.profile.id = 'id';
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function initialize(strategy) {
|
|
133
|
+
setDefaults(strategy);
|
|
134
|
+
// TODO lets test with newer geoaxis server to see if this is still needed
|
|
135
|
+
// If it is, this should be a admin client side option, would also need to modify the
|
|
136
|
+
// renderer to provide a more generic message
|
|
137
|
+
strategy.redirect = false;
|
|
138
|
+
configure(strategy);
|
|
139
|
+
function authenticate(req, res, next) {
|
|
140
|
+
passport.authenticate(strategy.name, function (err, user, info = {}) {
|
|
141
|
+
if (err)
|
|
142
|
+
return next(err);
|
|
143
|
+
req.user = user;
|
|
144
|
+
// For inactive or disabled accounts don't generate an authorization token
|
|
145
|
+
if (!user.active || !user.enabled) {
|
|
146
|
+
log.warn('Failed user login attempt: User ' + user.username + ' account is inactive or disabled.');
|
|
147
|
+
return next();
|
|
148
|
+
}
|
|
149
|
+
if (!user.authentication.authenticationConfigurationId) {
|
|
150
|
+
log.warn('Failed user login attempt: ' + user.authentication.type + ' is not configured');
|
|
151
|
+
return next();
|
|
152
|
+
}
|
|
153
|
+
if (!user.authentication.authenticationConfiguration.enabled) {
|
|
154
|
+
log.warn('Failed user login attempt: Authentication ' + user.authentication.authenticationConfiguration.title + ' is disabled.');
|
|
155
|
+
return next();
|
|
156
|
+
}
|
|
157
|
+
tokenService.generateToken(user._id.toString(), TokenAssertion.Authorized, 60 * 5)
|
|
158
|
+
.then(token => {
|
|
159
|
+
req.token = token;
|
|
160
|
+
req.user = user;
|
|
161
|
+
req.info = info;
|
|
162
|
+
next();
|
|
163
|
+
}).catch(err => next(err));
|
|
164
|
+
})(req, res, next);
|
|
165
|
+
}
|
|
166
|
+
app.get(`/auth/${strategy.name}/signin`, function (req, res, next) {
|
|
167
|
+
passport.authenticate(strategy.name, {
|
|
168
|
+
scope: strategy.settings.scope,
|
|
169
|
+
state: req.query.state
|
|
170
|
+
})(req, res, next);
|
|
171
|
+
});
|
|
172
|
+
app.get(`/auth/${strategy.name}/callback`, authenticate, function (req, res) {
|
|
173
|
+
if (req.query.state === 'mobile') {
|
|
174
|
+
let uri;
|
|
175
|
+
if (!req.user.active || !req.user.enabled) {
|
|
176
|
+
uri = `mage://app/invalid_account?active=${req.user.active}&enabled=${req.user.enabled}`;
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
uri = `mage://app/authentication?token=${req.token}`;
|
|
180
|
+
}
|
|
181
|
+
if (strategy.redirect) {
|
|
182
|
+
res.redirect(uri);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
res.render('oauth', { uri: uri });
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
res.render('authentication', { host: req.getRoot(), login: { token: req.token, user: req.user } });
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
;
|
|
194
|
+
module.exports = {
|
|
195
|
+
initialize
|
|
196
|
+
};
|
|
197
|
+
//# sourceMappingURL=oauth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../src/authentication/oauth.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,MAAM,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EACrD,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,cAAc,EACzD,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,EAC3B,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,EACvB,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,EAC1B,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,EAChC,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,EAChC,EAAE,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAE1D,MAAM,qBAAsB,SAAQ,cAAc;IAC/C,YAAY,OAAO,EAAE,MAAM;QACxB,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAEvB,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAAE,MAAM,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAC;SAAE;QAChG,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;QAEtC,IAAI,CAAC,OAAO,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IAED,WAAW,CAAC,WAAW,EAAE,IAAI;QAC1B,IAAI,CAAC,OAAO,CAAC,GAAG,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