1 | # Digital Signing Application
|
2 |
|
3 | [GitHub Repository](https://github.com/digital-blueprint/esign-app) |
|
4 | [npmjs package](https://www.npmjs.com/package/@digital-blueprint/esign-app) |
|
5 | [Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/esign-app/) |
|
6 | [Esign Bundle](https://gitlab.tugraz.at/dbp/esign/dbp-relay-esign-bundle) |
|
7 | [Project documentation](https://dbp-demo.tugraz.at/site/software/esign.html)
|
8 |
|
9 | [![Build and Test](https://github.com/digital-blueprint/esign-app/actions/workflows/build-test-publish.yml/badge.svg)](https://github.com/digital-blueprint/esign-app/actions/workflows/build-test-publish.yml)
|
10 |
|
11 | Esign - The digital signature service at the university.
|
12 |
|
13 | ## Prerequisites
|
14 |
|
15 | - You need the [API server](https://github.com/digital-blueprint/relay-server-template) running
|
16 | - You need the [DbpRelayEsignBundle](https://github.com/digital-blueprint/relay-esign-bundle) to allow signing of PDF files
|
17 | - For more information please visit the [ESign project documentation](https://handbook.digital-blueprint.org/blueprints/esign/)
|
18 |
|
19 | ## Local development
|
20 |
|
21 | ```bash
|
22 | # get the source
|
23 | git clone git@github.com:digital-blueprint/esign-app.git
|
24 | cd esign-app
|
25 | git submodule update --init
|
26 |
|
27 | # install dependencies
|
28 | npm install
|
29 |
|
30 | # constantly build dist/bundle.js and run a local web-server on port 8001
|
31 | npm run watch
|
32 |
|
33 | # constantly build dist/bundle.js and run a local web-server on port 8001 using a custom assets directory assets_custom/
|
34 | npm run watch-custom
|
35 |
|
36 | # run tests
|
37 | npm test
|
38 | ```
|
39 |
|
40 | Jump to <http://localhost:8001> and you should get a Single Sign On login page.
|
41 |
|
42 | To use the Nextcloud functionality you need a running Nextcloud server with the
|
43 | [webapppassword](https://github.com/digital-blueprint/webapppassword) Nextcloud app like this
|
44 | [Nextcloud Development Environment](https://github.com/digital-blueprint/webapppassword/tree/main/docker).
|
45 |
|
46 | ## Using this app as pre-built package
|
47 |
|
48 | ### Install app
|
49 |
|
50 | If you want to install the DBP Signature App in a new folder `signature-app` with a path prefix `/` you can call:
|
51 |
|
52 | ```bash
|
53 | npx @digital-blueprint/cli install-app signature signature-app /
|
54 | ```
|
55 |
|
56 | Afterwards you can point your Apache web-server to `signature-app/public`.
|
57 |
|
58 | Make sure you are allowing `.htaccess` files in your Apache configuration.
|
59 |
|
60 | Also make sure to add all of your resources you are using (like your API and Keycloak servers) to the
|
61 | `Content-Security-Policy` in your `signature-app/public/.htaccess`, so the browser allows access to those sites.
|
62 |
|
63 | You can also use this app directly from the [Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/esign-app/)
|
64 | for example like this: [dbp-signature/index.html](https://github.com/digital-blueprint/esign-app/-/tree/master/examples/dbp-signature/index.html)
|
65 |
|
66 | Note that you will need a Keycloak server along with a client id for the domain you are running this html on.
|
67 |
|
68 | ### Update app
|
69 |
|
70 | If you want to update the DBP Signature App in the current folder you can call:
|
71 |
|
72 | ```bash
|
73 | npx @digital-blueprint/cli update-app signature
|
74 | ```
|
75 |
|
76 | ## Activities
|
77 |
|
78 | This app has the following activities:
|
79 | - `dbp-acquire-3g-ticket`
|
80 | - `dbp-show-active-tickets`
|
81 | - `dbp-show-reference-ticket`
|
82 |
|
83 | You can find the documentation of these activities in the [esign activities documentation](https://github.com/digital-blueprint/esign-app/-/tree/master/src).
|
84 |
|
85 | ## Adapt app
|
86 |
|
87 | ### Functionality
|
88 |
|
89 | You can add multiple attributes to the `<dbp-signature>` tag.
|
90 |
|
91 | | attribute name | value | Link to description |
|
92 | |----------------|-------| ------------|
|
93 | | `provider-root` | Boolean | [app-shell](https://github.com/digital-blueprint/toolkit/tree/main/packages/app-shell#attributes) |
|
94 | | `lang` | String | [language-select](https://github.com/digital-blueprint/toolkit/tree/main/packages/language-select#attributes) |
|
95 | | `entry-point-url` | String | [app-shell](https://github.com/digital-blueprint/toolkit/tree/main/packages/app-shell#attributes) |
|
96 | | `keycloak-config` | Object | [app-shell](https://github.com/digital-blueprint/toolkit/tree/main/packages/app-shell#attributes) |
|
97 | | `base-path` | String | [app-shell](https://github.com/digital-blueprint/toolkit/tree/main/packages/app-shell#attributes) |
|
98 | | `src` | String | [app-shell](https://github.com/digital-blueprint/toolkit/tree/main/packages/app-shell#attributes) |
|
99 | | `html-overrides` | String | [common](https://github.com/digital-blueprint/toolkit/tree/main/packages/common#overriding-slots-in-nested-web-components) |
|
100 | | `themes` | Array | [theme-switcher](https://github.com/digital-blueprint/toolkit/tree/main/packages/theme-switcher#themes-attribute) |
|
101 | | `darkModeThemeOverride` | String | [theme-switcher](https://github.com/digital-blueprint/toolkit/tree/main/packages/theme-switcher#themes-attribute) |
|
102 | | `gp-search-hash-string` | String | [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src) |
|
103 | | `gp-search-self-test-string-array` | String | [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src) |
|
104 | | `gp-self-test-valid` | Boolean | [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src) |
|
105 | | `ticket-types` | Object | [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src#shared-attributes) |
|
106 | | `show-preselected` | Boolean | [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src) |
|
107 | | `preselected-option` | String | [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src) |
|
108 | | `file-handling-enabled-targets` | String | [file-handling](https://github.com/digital-blueprint/toolkit/tree/main/packages/file-handling#attributes) |
|
109 | | `nextcloud-web-app-password-url` | String | [file-handling](https://github.com/digital-blueprint/toolkit/tree/main/packages/file-handling#attributes) |
|
110 | | `nextcloud-web-dav-url` | String | [file-handling](https://github.com/digital-blueprint/toolkit/tree/main/packages/file-handling#attributes) |
|
111 | | `nextcloud-file-url` | String | [file-handling](https://github.com/digital-blueprint/toolkit/tree/main/packages/file-handling#attributes) |
|
112 | | `nextcloud-auth-info` | String | [file-handling](https://github.com/digital-blueprint/toolkit/tree/main/packages/file-handling#attributes) |
|
113 | | `nextcloud-name` | String | [file-handling](https://github.com/digital-blueprint/toolkit/tree/main/packages/file-handling#attributes) |
|
114 | | `allow-annotating` | Boolean | [esign activities](https://github.com/digital-blueprint/esign-app/tree/main/src) |
|
115 | | `file-handling-enabled-targets` | String | [esign activities](https://github.com/digital-blueprint/esign-app/tree/main/src) |
|
116 |
|
117 | #### Mandatory attributes
|
118 |
|
119 | If you are not using the `provider-root` attribute to "terminate" all provider attributes
|
120 | you need to manually add these attributes so that the topic will work properly:
|
121 |
|
122 | ```html
|
123 | <dbp-signature
|
124 | auth
|
125 | requested-login-status
|
126 | analytics-event
|
127 | initial-file-handling-state
|
128 | clipboard-files
|
129 | >
|
130 | </dbp-signature>
|
131 | ```
|
132 |
|
133 | ### Design
|
134 |
|
135 | For frontend design customizations, such as logo, colors, font, favicon, and more, take a look at the [theming documentation](https://handbook.digital-blueprint.org/frameworks/frontend/theming/).
|
136 |
|
137 | ## "dbp-signature" slots
|
138 |
|
139 | These are common slots for the app-shell. You can find the documentation of these slots in the [app-shell documentation](https://github.com/digital-blueprint/toolkit/tree/main/packages/app-shell).
|
140 | For the app specific slots take a look at the [esign activities documentation](https://github.com/digital-blueprint/esign-app/tree/main/src).
|
141 |
|