From 5fe058003f9a8bd51dace5a31b5327db52916129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Emarianfoo=E2=80=9C?= <13335743+marianfoo@users.noreply.github.com> Date: Fri, 13 Sep 2024 21:30:30 +0200 Subject: [PATCH 01/14] feat(ui5-middleware-onelogin): possible to provide certificate to login directly --- .../lib/cookieGetter.js | 10 ++- .../lib/cookieGetter.js.map | 2 +- packages/ui5-middleware-onelogin/lib/index.js | 3 + .../ui5-middleware-onelogin/lib/index.js.map | 2 +- .../sample/certificate/.gitignore | 18 +++++ .../sample/certificate/package.json | 21 +++++ .../sample/certificate/ui5.yaml | 27 +++++++ .../sample/certificate/webapp/Component.js | 40 +++++++++ .../webapp/controller/App.controller.js | 10 +++ .../webapp/controller/BaseController.js | 75 +++++++++++++++++ .../webapp/controller/Main.controller.js | 9 +++ .../certificate/webapp/i18n/i18n.properties | 3 + .../webapp/i18n/i18n_de.properties | 3 + .../webapp/i18n/i18n_en.properties | 3 + .../sample/certificate/webapp/index-cdn.html | 31 +++++++ .../sample/certificate/webapp/index.html | 30 +++++++ .../sample/certificate/webapp/manifest.json | 81 +++++++++++++++++++ .../certificate/webapp/model/formatter.js | 9 +++ .../sample/certificate/webapp/model/models.js | 11 +++ .../certificate/webapp/view/App.view.xml | 3 + .../certificate/webapp/view/Main.view.xml | 13 +++ .../src/cookieGetter.ts | 18 ++++- packages/ui5-middleware-onelogin/src/index.ts | 3 + packages/ui5-middleware-onelogin/src/types.ts | 3 + pnpm-lock.yaml | 26 ++++++ pnpm-workspace.yaml | 1 + 26 files changed, 451 insertions(+), 4 deletions(-) create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/.gitignore create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/package.json create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/ui5.yaml create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/Component.js create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/controller/App.controller.js create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/controller/BaseController.js create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/controller/Main.controller.js create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/i18n/i18n.properties create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/i18n/i18n_de.properties create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/i18n/i18n_en.properties create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/index-cdn.html create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/index.html create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/manifest.json create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/model/formatter.js create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/model/models.js create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/view/App.view.xml create mode 100644 packages/ui5-middleware-onelogin/sample/certificate/webapp/view/Main.view.xml diff --git a/packages/ui5-middleware-onelogin/lib/cookieGetter.js b/packages/ui5-middleware-onelogin/lib/cookieGetter.js index 95a427fb4..c296ced85 100644 --- a/packages/ui5-middleware-onelogin/lib/cookieGetter.js +++ b/packages/ui5-middleware-onelogin/lib/cookieGetter.js @@ -132,7 +132,15 @@ class CookieGetter { }; try { const browser = yield playwright_chromium_1.chromium.launch(playwrightOpt); - const context = yield browser.newContext({ ignoreHTTPSErrors: true }); + const context = yield browser.newContext({ ignoreHTTPSErrors: true, + clientCertificates: [ + { + origin: effectiveOptions.configuration.clientCertificatesOrigin, + pfxPath: effectiveOptions.configuration.clientCertificatesPfxPath, + passphrase: effectiveOptions.configuration.clientCertificatesPfxPpassphrase, + } + ] + }); const page = yield context.newPage(); if (!effectiveOptions.configuration.useCertificate) { yield page.goto(attr.url, { waitUntil: "domcontentloaded" }); diff --git a/packages/ui5-middleware-onelogin/lib/cookieGetter.js.map b/packages/ui5-middleware-onelogin/lib/cookieGetter.js.map index 3856d46b3..fc6590245 100644 --- a/packages/ui5-middleware-onelogin/lib/cookieGetter.js.map +++ b/packages/ui5-middleware-onelogin/lib/cookieGetter.js.map @@ -1 +1 @@ -{"version":3,"file":"cookieGetter.js","sourceRoot":"","sources":["../src/cookieGetter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,kEAAkC;AAElC,MAAM,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AACvC,6DAA8D;AAa9D,MAAqB,YAAY;IAChC;;;;OAIG;IACK,cAAc,CAAC,GAAS;QAC/B,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAChC,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;gBAC9D,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/B,CAAC;iBAAM,CAAC;gBACP,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;YAC3C,CAAC;QACF,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,CAAC;IACZ,CAAC;IAED;;;OAGG;IACK,SAAS,CAAC,KAAc;QAC/B,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,SAAS,CAAC;QAC1C,IAAI,CAAC;YACJ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACZ,OAAO,SAAS,CAAC;QAClB,CAAC;IACF,CAAC;IAED;;;OAGG;IACG,YAAY,CAAC,IAAU;;YAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAA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zJ,CAAC;gBACD,OAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YAChC,CAAC;YAAC,OAAO,MAAM,EAAE,CAAC;gBACjB,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;gBAClB,MAAM,MAAM,CAAC;YACd,CAAC;QACF,CAAC;KAAA;CACD;AAhOD,+BAgOC"} \ No newline at end of file diff --git a/packages/ui5-middleware-onelogin/lib/index.js b/packages/ui5-middleware-onelogin/lib/index.js index fca452153..686cebe95 100644 --- a/packages/ui5-middleware-onelogin/lib/index.js +++ b/packages/ui5-middleware-onelogin/lib/index.js @@ -30,6 +30,9 @@ var firstTime = true; * @property {string} [username] the username => env:UI5_MIDDLEWARE_ONELOGIN_USERNAME * @property {string|yo} [password] the password => env:UI5_MIDDLEWARE_ONELOGIN_PASSWORD * @property {boolean|yo} [useCertificate] use certificate login instead of username/password + * @property {string} [clientCertificatesOrigin] the origin of the client certificates => env:UI5_MIDDLEWARE_ONELOGIN_CLIENT_CERTIFICATES_ORIGIN + * @property {string} [clientCertificatesPfxPath] the path to the client certificates => env:UI5_MIDDLEWARE_ONELOGIN_CLIENT_CERTIFICATES_PFX_PATH + * @property {string} [clientCertificatesPfxPpassphrase] the passphrase to the client certificates => env:UI5_MIDDLEWARE_ONELOGIN_CLIENT_CERTIFICATES_PFX_PASSPHRASE * @property {boolean|yo} [debug] see output */ /** diff --git a/packages/ui5-middleware-onelogin/lib/index.js.map b/packages/ui5-middleware-onelogin/lib/index.js.map index cc1dcf318..a39f39c91 100644 --- a/packages/ui5-middleware-onelogin/lib/index.js.map +++ b/packages/ui5-middleware-onelogin/lib/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,mCAAmC;AACnC,oDAA4B;AAC5B,kEAA0C;AAE1C,gBAAM,CAAC,MA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xB,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC;gBACzB,OAAO,MAAM,CAAC,OAAO,CAAC;gBACtB,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE;oBACrC,MAAM,EAAE,KAAK,GAAG,IAAI,EAAE,WAAW;oBACjC,QAAQ,EAAE,IAAI,EAAE,+CAA+C;oBAC/D,MAAM,EAAE,KAAK,EAAE,wCAAwC;iBACvD,CAAC,CAAC;gBACH,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,IAAA,kBAAS,EAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,kCAAO,MAAM,KAAE,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAG,EAAE,IAAI,CAAC,CAAC;YACnH,CAAC,CAAC,CAAC;YACJ,IAAI,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,SAAS,EAAE,CAAC;gBAC9C,GAAG,CAAC,IAAI,CAAC,oBAAoB,SAAS,EAAE,CAAC,CAAC;gBAC1C,SAAS,GAAG,KAAK,CAAC;YACnB,CAAC;YACD,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;YAE/B,IAAI,EAAE,CAAC;QACR,CAAC;KAAA,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/ui5-middleware-onelogin/sample/certificate/.gitignore b/packages/ui5-middleware-onelogin/sample/certificate/.gitignore new file mode 100644 index 000000000..16826c006 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/.gitignore @@ -0,0 +1,18 @@ +# build results +dist +coverage + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Dependency directories +node_modules/ + +.DS_Store +.env +tmp/ +sap.pfx diff --git a/packages/ui5-middleware-onelogin/sample/certificate/package.json b/packages/ui5-middleware-onelogin/sample/certificate/package.json new file mode 100644 index 000000000..08e176c14 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/package.json @@ -0,0 +1,21 @@ +{ + "name": "certificate", + "version": "1.0.0", + "description": "UI5 Application: certificate", + "author": "„marianfoo“", + "license": "Apache-2.0", + "scripts": { + "clean": "rimraf dist coverage", + "build": "ui5 build --clean-dest", + "build:opt": "ui5 build self-contained --clean-dest --all", + "start": "ui5 serve --port 8080 -o index.html", + "start:silent": "ui5 serve --port 8080 ", + "start-cdn": "ui5 serve --port 8080 -o index-cdn.html", + "start:dist": "npm start -- --config ui5-dist.yaml", + "start:dist-cdn": "npm run start-cdn -- --config ui5-dist.yaml" + }, + "devDependencies": { + "@ui5/cli": "^4.0.6", + "ui5-middleware-onelogin": "file:../.." + } +} diff --git a/packages/ui5-middleware-onelogin/sample/certificate/ui5.yaml b/packages/ui5-middleware-onelogin/sample/certificate/ui5.yaml new file mode 100644 index 000000000..29bcd2c51 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/ui5.yaml @@ -0,0 +1,27 @@ +specVersion: "4.0" +metadata: + name: certificate +type: application +framework: + name: OpenUI5 + version: "1.120.20" + libraries: + - name: sap.m + - name: sap.ui.core + - name: themelib_sap_horizon +builder: + resources: + excludes: + - "test/e2e/**" +server: + customMiddleware: + - name: ui5-middleware-onelogin + afterMiddleware: compression + configuration: + debug: true + path: https://emea.cockpit.btp.cloud.sap + subdirectory: cockpit#/ + useCertificate: true + clientCertificatesOrigin: "https://accounts.sap.com" + clientCertificatesPfxPath: "sap.pfx" + # clientCertificatesPfxPpassphrase: used from environment variable diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/Component.js b/packages/ui5-middleware-onelogin/sample/certificate/webapp/Component.js new file mode 100644 index 000000000..76ea45387 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/Component.js @@ -0,0 +1,40 @@ +sap.ui.define(["sap/ui/core/UIComponent", "sap/ui/Device", "./model/models"], function (UIComponent, Device, models) { + "use strict"; + + return UIComponent.extend("certificate.Component", { + metadata: { + manifest: "json", + }, + init: function () { + // call the base component's init function + UIComponent.prototype.init.call(this); // create the views based on the url/hash + + // create the device model + this.setModel(models.createDeviceModel(), "device"); + + // create the views based on the url/hash + this.getRouter().initialize(); + }, + /** + * This method can be called to determine whether the sapUiSizeCompact or sapUiSizeCozy + * design mode class should be set, which influences the size appearance of some controls. + * @public + * @returns {string} css class, either 'sapUiSizeCompact' or 'sapUiSizeCozy' - or an empty string if no css class should be set + */ + getContentDensityClass: function () { + if (this.contentDensityClass === undefined) { + // check whether FLP has already set the content density class; do nothing in this case + if (document.body.classList.contains("sapUiSizeCozy") || document.body.classList.contains("sapUiSizeCompact")) { + this.contentDensityClass = ""; + } else if (!Device.support.touch) { + // apply "compact" mode if touch is not supported + this.contentDensityClass = "sapUiSizeCompact"; + } else { + // "cozy" in case of touch support; default for most sap.m controls, but needed for desktop-first controls like sap.ui.table.Table + this.contentDensityClass = "sapUiSizeCozy"; + } + } + return this.contentDensityClass; + }, + }); +}); diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/controller/App.controller.js b/packages/ui5-middleware-onelogin/sample/certificate/webapp/controller/App.controller.js new file mode 100644 index 000000000..ca278d882 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/controller/App.controller.js @@ -0,0 +1,10 @@ +sap.ui.define(["./BaseController"], function (BaseController) { + "use strict"; + + return BaseController.extend("certificate.controller.App", { + onInit: function () { + // apply content density mode to root view + this.getView().addStyleClass(this.getOwnerComponent().getContentDensityClass()); + }, + }); +}); diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/controller/BaseController.js b/packages/ui5-middleware-onelogin/sample/certificate/webapp/controller/BaseController.js new file mode 100644 index 000000000..67c9bc083 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/controller/BaseController.js @@ -0,0 +1,75 @@ +sap.ui.define(["sap/ui/core/mvc/Controller", "sap/ui/core/UIComponent", "sap/ui/core/routing/History"], function (Controller, UIComponent, History) { + "use strict"; + + return Controller.extend("certificate.controller.BaseController", { + /** + * Convenience method for accessing the component of the controller's view. + * @returns {sap.ui.core.Component} The component of the controller's view + */ + getOwnerComponent: function () { + return Controller.prototype.getOwnerComponent.call(this); + }, + + /** + * Convenience method to get the components' router instance. + * @returns {sap.m.routing.Router} The router instance + */ + getRouter: function () { + return UIComponent.getRouterFor(this); + }, + + /** + * Convenience method for getting the i18n resource bundle of the component. + * @returns {sap.base.i18n.ResourceBundle} The i18n resource bundle of the component + */ + getResourceBundle: function () { + const oModel = this.getOwnerComponent().getModel("i18n"); + return oModel.getResourceBundle(); + }, + + /** + * Convenience method for getting the view model by name in every controller of the application. + * @param {string} [sName] The model name + * @returns {sap.ui.model.Model} The model instance + */ + getModel: function (sName) { + return this.getView().getModel(sName); + }, + + /** + * Convenience method for setting the view model in every controller of the application. + * @param {sap.ui.model.Model} oModel The model instance + * @param {string} [sName] The model name + * @returns {sap.ui.core.mvc.Controller} The current base controller instance + */ + setModel: function (oModel, sName) { + this.getView().setModel(oModel, sName); + return this; + }, + + /** + * Convenience method for triggering the navigation to a specific target. + * @public + * @param {string} sName Target name + * @param {object} [oParameters] Navigation parameters + * @param {boolean} [bReplace] Defines if the hash should be replaced (no browser history entry) or set (browser history entry) + */ + navTo: function (sName, oParameters, bReplace) { + this.getRouter().navTo(sName, oParameters, undefined, bReplace); + }, + + /** + * Convenience event handler for navigating back. + * It there is a history entry we go one step back in the browser history + * If not, it will replace the current entry of the browser history with the main route. + */ + onNavBack: function () { + const sPreviousHash = History.getInstance().getPreviousHash(); + if (sPreviousHash !== undefined) { + window.history.go(-1); + } else { + this.getRouter().navTo("main", {}, undefined, true); + } + }, + }); +}); diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/controller/Main.controller.js b/packages/ui5-middleware-onelogin/sample/certificate/webapp/controller/Main.controller.js new file mode 100644 index 000000000..8372e777f --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/controller/Main.controller.js @@ -0,0 +1,9 @@ +sap.ui.define(["./BaseController", "sap/m/MessageBox"], function (BaseController, MessageBox) { + "use strict"; + + return BaseController.extend("certificate.controller.Main", { + sayHello: function () { + MessageBox.show("Hello World!"); + }, + }); +}); diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/i18n/i18n.properties b/packages/ui5-middleware-onelogin/sample/certificate/webapp/i18n/i18n.properties new file mode 100644 index 000000000..7ebc2fbaf --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/i18n/i18n.properties @@ -0,0 +1,3 @@ +appTitle=certificate +appDescription=UI5 Application certificate +btnText=Say Hello diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/i18n/i18n_de.properties b/packages/ui5-middleware-onelogin/sample/certificate/webapp/i18n/i18n_de.properties new file mode 100644 index 000000000..90d424886 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/i18n/i18n_de.properties @@ -0,0 +1,3 @@ +appTitle=certificate +appDescription=UI5 Application certificate +btnText=Sag Hallo diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/i18n/i18n_en.properties b/packages/ui5-middleware-onelogin/sample/certificate/webapp/i18n/i18n_en.properties new file mode 100644 index 000000000..7ebc2fbaf --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/i18n/i18n_en.properties @@ -0,0 +1,3 @@ +appTitle=certificate +appDescription=UI5 Application certificate +btnText=Say Hello diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/index-cdn.html b/packages/ui5-middleware-onelogin/sample/certificate/webapp/index-cdn.html new file mode 100644 index 000000000..f4c52fb80 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/index-cdn.html @@ -0,0 +1,31 @@ + + + + + + + + + + UI5 Application: certificate + + + + + +
+ + diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/index.html b/packages/ui5-middleware-onelogin/sample/certificate/webapp/index.html new file mode 100644 index 000000000..85acce556 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/index.html @@ -0,0 +1,30 @@ + + + + + + + + + UI5 Application: certificate + + + + + +
+ + diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/manifest.json b/packages/ui5-middleware-onelogin/sample/certificate/webapp/manifest.json new file mode 100644 index 000000000..3e91f2063 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/manifest.json @@ -0,0 +1,81 @@ +{ + "_version": "1.12.0", + + "sap.app": { + "id": "certificate", + "type": "application", + "i18n": "i18n/i18n.properties", + "title": "{{appTitle}}", + "description": "{{appDescription}}", + "applicationVersion": { + "version": "${version}" + } + }, + + "sap.ui": { + "technology": "UI5", + "icons": {}, + "deviceTypes": { + "desktop": true, + "tablet": true, + "phone": true + } + }, + + "sap.ui5": { + "rootView": { + "viewName": "certificate.view.App", + "type": "XML", + "async": true, + "id": "app" + }, + + "dependencies": { + "minUI5Version": "1.120.20", + "libs": { + "sap.ui.core": {}, + "sap.m": {} + } + }, + + "handleValidation": true, + + "contentDensities": { + "compact": true, + "cozy": true + }, + + "models": { + "i18n": { + "type": "sap.ui.model.resource.ResourceModel", + "settings": { + "bundleName": "certificate.i18n.i18n" + } + } + }, + + "routing": { + "config": { + "routerClass": "sap.m.routing.Router", + "viewType": "XML", + "viewPath": "certificate.view", + "controlId": "app", + "controlAggregation": "pages", + "async": true + }, + "routes": [ + { + "pattern": "", + "name": "main", + "target": "main" + } + ], + "targets": { + "main": { + "viewId": "main", + "viewName": "Main" + } + } + } + } +} diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/model/formatter.js b/packages/ui5-middleware-onelogin/sample/certificate/webapp/model/formatter.js new file mode 100644 index 000000000..61fc2d616 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/model/formatter.js @@ -0,0 +1,9 @@ +sap.ui.define(function () { + "use strict"; + + return { + formatValue: function (value) { + return value && value.toUpperCase(); + }, + }; +}); diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/model/models.js b/packages/ui5-middleware-onelogin/sample/certificate/webapp/model/models.js new file mode 100644 index 000000000..2b3e7def6 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/model/models.js @@ -0,0 +1,11 @@ +sap.ui.define(["sap/ui/model/json/JSONModel", "sap/ui/model/BindingMode", "sap/ui/Device"], function (JSONModel, BindingMode, Device) { + "use strict"; + + return { + createDeviceModel: function () { + const oModel = new JSONModel(Device); + oModel.setDefaultBindingMode(BindingMode.OneWay); + return oModel; + }, + }; +}); diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/view/App.view.xml b/packages/ui5-middleware-onelogin/sample/certificate/webapp/view/App.view.xml new file mode 100644 index 000000000..25df23128 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/view/App.view.xml @@ -0,0 +1,3 @@ + + + diff --git a/packages/ui5-middleware-onelogin/sample/certificate/webapp/view/Main.view.xml b/packages/ui5-middleware-onelogin/sample/certificate/webapp/view/Main.view.xml new file mode 100644 index 000000000..3732fd043 --- /dev/null +++ b/packages/ui5-middleware-onelogin/sample/certificate/webapp/view/Main.view.xml @@ -0,0 +1,13 @@ + + + + + +