mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-09-18 00:32:19 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0ef20e96c | ||
|
|
e3b6f14536 | ||
|
|
03bc259f88 | ||
|
|
59a1dffd7c | ||
|
|
fb8c51de74 | ||
|
|
1eaa70193d | ||
|
|
2c7bed0b8b | ||
|
|
87d0af5a39 | ||
|
|
8ccbfac0b1 | ||
|
|
8550bf976b | ||
|
|
86004881b0 | ||
|
|
3d19fc87e3 | ||
|
|
80bcdad851 | ||
|
|
afd1c8d87e | ||
|
|
6941f83b8f | ||
|
|
3a274a3a7f | ||
|
|
5a48342a8d | ||
|
|
6b06de4019 | ||
|
|
c5c9bcf433 | ||
|
|
b40ba7ad63 | ||
|
|
362f6adf07 | ||
|
|
bbd6b0f874 | ||
|
|
b1a9ba44d0 |
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@openstapps/proxy": patch
|
||||
---
|
||||
|
||||
Bumping proxy version to rebuild image
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
"@openstapps/projectmanagement": patch
|
||||
"@openstapps/core-tools": patch
|
||||
"@openstapps/easy-ast": patch
|
||||
"@openstapps/app": patch
|
||||
---
|
||||
|
||||
Updated node-glob dependency
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@openstapps/app-cypress": patch
|
||||
---
|
||||
|
||||
removed edge browser
|
||||
+2
-2
@@ -120,6 +120,6 @@ audit:
|
||||
script:
|
||||
- pnpm audit --prod --audit-level critical
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'main'
|
||||
allow_failure: false
|
||||
- !reference [.limit_pipelines, rules]
|
||||
# - if: $CI_COMMIT_BRANCH == 'main'
|
||||
# allow_failure: false
|
||||
|
||||
Vendored
+7
@@ -4,6 +4,13 @@
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch Chrome",
|
||||
"request": "launch",
|
||||
"type": "chrome",
|
||||
"url": "http://localhost:8100",
|
||||
"webRoot": "${workspaceFolder}/frontend/app/www"
|
||||
},
|
||||
{
|
||||
"type":"node",
|
||||
"request": "launch",
|
||||
|
||||
@@ -1,5 +1,31 @@
|
||||
# @openstapps/backend
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/core-tools@4.0.2
|
||||
- @openstapps/logger@4.0.2
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 6b06de40: Updated nodemailer dependency
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/core-tools@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b40ba7ad: Updated Elasticsearch dependency
|
||||
- @openstapps/core@4.0.0
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -29,19 +29,6 @@ const menus = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: 'local_library',
|
||||
route: '/hebis-search',
|
||||
title: 'library catalog',
|
||||
translations: {
|
||||
de: {
|
||||
title: 'Bibliothekskatalog',
|
||||
},
|
||||
en: {
|
||||
title: 'library catalog',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: 'inventory_2',
|
||||
route: '/catalog',
|
||||
@@ -112,7 +99,7 @@ const menus = [
|
||||
icon: 'school',
|
||||
items: [
|
||||
{
|
||||
icon: 'grade',
|
||||
icon: 'star',
|
||||
route: '/favorites',
|
||||
title: 'favorites',
|
||||
translations: {
|
||||
@@ -137,20 +124,6 @@ const menus = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
authProvider: 'paia',
|
||||
icon: 'badge',
|
||||
route: '/library-account',
|
||||
title: 'library account',
|
||||
translations: {
|
||||
de: {
|
||||
title: 'Bibliothekskonto',
|
||||
},
|
||||
en: {
|
||||
title: 'library account',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: 'settings',
|
||||
route: '/settings',
|
||||
|
||||
@@ -5,8 +5,8 @@ const userGroupSetting = {
|
||||
categories: ['profile'],
|
||||
defaultValue: 'students',
|
||||
description:
|
||||
'The user group the app is going to be used.' +
|
||||
'This settings for example is getting used for the predefined price category of mensa meals.',
|
||||
'The user group the app is going to use primarily.' +
|
||||
' This settings for example is getting used for the predefined price category of mensa meals.',
|
||||
inputType: SCSettingInputType.SingleChoice,
|
||||
name: 'group',
|
||||
order: 1,
|
||||
@@ -25,7 +25,7 @@ const userGroupSetting = {
|
||||
},
|
||||
en: {
|
||||
description:
|
||||
'The user group the app is going to be used.' +
|
||||
'The user group the app is going to use primarily.' +
|
||||
' This settings for example is getting used for the predefined price category of mensa meals.',
|
||||
name: 'Group',
|
||||
values: ['students', 'employees', 'guests'],
|
||||
|
||||
@@ -13,42 +13,23 @@ const config = {
|
||||
default: {
|
||||
client: {
|
||||
clientId: '1cac3f99-33fa-4234-8438-979f07e0cdab',
|
||||
scopes: '',
|
||||
url: 'https://cas.rz.uni-frankfurt.de/cas/oauth2.0',
|
||||
scopes: 'openid profile email offline_access',
|
||||
url: 'https://idp5-test.ub.uni-frankfurt.de/idp/profile/oidc',
|
||||
},
|
||||
endpoints: {
|
||||
authorization: 'https://cas.rz.uni-frankfurt.de/cas/oauth2.0/authorize',
|
||||
endSession: 'https://cas.rz.uni-frankfurt.de/cas/logout',
|
||||
authorization: 'https://idp5-test.ub.uni-frankfurt.de/idp/profile/oidc/authorize',
|
||||
endSession: 'https://idp5-test.ub.uni-frankfurt.de/idp/profile/oidc/end-session',
|
||||
mapping: {
|
||||
id: '$.id',
|
||||
email: '$.attributes.mailPrimaryAddress',
|
||||
familyName: '$.attributes.sn',
|
||||
givenName: '$.attributes.givenName',
|
||||
name: '$.attributes.givenName',
|
||||
role: '$.attributes.eduPersonPrimaryAffiliation',
|
||||
studentId: '$.attributes.employeeNumber',
|
||||
},
|
||||
token: 'https://cas.rz.uni-frankfurt.de/cas/oauth2.0/accessToken',
|
||||
userinfo: 'https://cas.rz.uni-frankfurt.de/cas/oauth2.0/profile',
|
||||
},
|
||||
},
|
||||
paia: {
|
||||
client: {
|
||||
clientId: '',
|
||||
scopes: '',
|
||||
url: 'https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php',
|
||||
},
|
||||
endpoints: {
|
||||
authorization:
|
||||
'https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php',
|
||||
endSession: 'https://ubffm.hds.hebis.de/Shibboleth.sso/Logout',
|
||||
mapping: {
|
||||
id: '$.email',
|
||||
id: '$.preferred_username',
|
||||
email: '$.mailPrimaryAddress',
|
||||
familyName: '$.family_name',
|
||||
givenName: '$.given_name',
|
||||
name: '$.name',
|
||||
role: '$.type',
|
||||
role: '$.eduPersonPrimaryAffiliation',
|
||||
studentId: '$.employeeNumber',
|
||||
},
|
||||
token: 'https://hds.hebis.de/paia/auth/login',
|
||||
userinfo: 'https://hds.hebis.de/paia/core',
|
||||
token: 'https://idp5-test.ub.uni-frankfurt.de/idp/profile/oidc/token',
|
||||
userinfo: 'https://idp5-test.ub.uni-frankfurt.de/idp/profile/oidc/userinfo',
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -60,16 +41,6 @@ const config = {
|
||||
authProvider: 'default',
|
||||
url: 'https://his-self-service.rz.uni-frankfurt.de',
|
||||
},
|
||||
daia: {
|
||||
url: 'https://daia.hebis.de/DAIA2/UB_Frankfurt',
|
||||
},
|
||||
hebisProxy: {
|
||||
url: 'https://proxy.ub.uni-frankfurt.de/login?qurl=',
|
||||
},
|
||||
paia: {
|
||||
authProvider: 'paia',
|
||||
url: 'https://hds.hebis.de/paia/core',
|
||||
},
|
||||
/** TODO: idCards: {
|
||||
authProvider: 'default',
|
||||
url: 'TODO',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/backend",
|
||||
"description": "A reference implementation for a StApps backend",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.3",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-only",
|
||||
@@ -36,18 +36,18 @@
|
||||
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
|
||||
"lint": "tsc --noEmit && eslint --ext .ts src/",
|
||||
"lint:fix": "eslint --fix --ext .ts src/",
|
||||
"start": "cross-env NODE_CONFIG_ENV=elasticsearch ALLOW_NO_TRANSPORT=true node app.js",
|
||||
"start": "cross-env NODE_CONFIG_ENV=elasticsearch ALLOW_NO_TRANSPORT=true NODE_APP_INSTANCE=\"f-u\" node app.js",
|
||||
"start:debug": "cross-env STAPPS_LOG_LEVEL=31 NODE_CONFIG_ENV=elasticsearch ALLOW_NO_TRANSPORT=true node app.js",
|
||||
"test": "pnpm run test:unit",
|
||||
"test:integration": "sh integration-test.sh",
|
||||
"test:unit": "cross-env NODE_CONFIG_ENV=elasticsearch ALLOW_NO_TRANSPORT=true STAPPS_LOG_LEVEL=0 mocha --exit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@elastic/elasticsearch": "8.4.0",
|
||||
"@elastic/elasticsearch": "8.14.1",
|
||||
"@openstapps/core": "workspace:*",
|
||||
"@openstapps/core-tools": "workspace:*",
|
||||
"@openstapps/logger": "workspace:*",
|
||||
"@types/body-parser": "1.19.2",
|
||||
"@types/body-parser": "1.19.6",
|
||||
"@types/cors": "2.8.13",
|
||||
"@types/express": "4.17.17",
|
||||
"@types/geojson": "1.0.6",
|
||||
@@ -56,20 +56,20 @@
|
||||
"@types/nodemailer": "6.4.7",
|
||||
"@types/promise-queue": "2.2.0",
|
||||
"@types/uuid": "8.3.4",
|
||||
"body-parser": "1.20.2",
|
||||
"body-parser": "1.20.3",
|
||||
"cors": "2.8.5",
|
||||
"cosmiconfig": "8.1.3",
|
||||
"deepmerge": "4.3.1",
|
||||
"express": "4.18.2",
|
||||
"express": "4.21.2",
|
||||
"express-prom-bundle": "6.6.0",
|
||||
"express-promise-router": "4.1.1",
|
||||
"got": "12.6.0",
|
||||
"moment": "2.30.1",
|
||||
"morgan": "1.10.0",
|
||||
"morgan": "1.10.1",
|
||||
"nock": "13.3.1",
|
||||
"node-cache": "5.1.2",
|
||||
"node-cron": "3.0.2",
|
||||
"nodemailer": "6.9.1",
|
||||
"nodemailer": "6.9.9",
|
||||
"prom-client": "14.1.1",
|
||||
"promise-queue": "2.2.5",
|
||||
"uuid": "8.3.2"
|
||||
@@ -83,7 +83,7 @@
|
||||
"@types/chai": "4.3.20",
|
||||
"@types/chai-as-promised": "7.1.8",
|
||||
"@types/mocha": "10.0.10",
|
||||
"@types/morgan": "1.9.4",
|
||||
"@types/morgan": "1.9.10",
|
||||
"@types/sinon": "10.0.14",
|
||||
"@types/sinon-express-mock": "1.3.9",
|
||||
"@types/supertest": "2.0.12",
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import jwt from 'jsonwebtoken';
|
||||
|
||||
const token =
|
||||
'AAdzZWNyZXQyo6P-FC41Z55r2N3phG84ZaFN5WQS-Q4GRYVeOLAj8yidLW8ErnsVHdH2lhsPm43UYdE3fCchxryqkDEeqxyw8lqR4aDGjJjKvVIMqWnlHWWhBwXG169NGAGpfwGyxMRp7MropxSFOsY0ZGgy6Sjo6Au65xvEFn2p4mHlVhN8HCZAjfwS7mD1g0jdYM_FO2eeAQHzAct_AxN5ttbREiwu00flZhJbURl3JN0QI4KcGL82nBFCS-Izui5mTbrv_ynRjds9W6oFVO1wU8E23-AvR8h9dwadVj1_J46EPUPZFrLrXd0ggZDxCq6MXMGThXKdNAdPpmJ7VWLk-N-tpLF84dsbcjda55KK6sVaj-T1WhHxgQYcu_j-cDnLNI9TDaFOnQZbtgDT0qX4W0166iGxMQw9gT7fMIkjaxx02_dOwETjywKubFFuvCaHogn5mdnqsNiNL0mUgYTKmXfKyKwJGVxk2RHNt0xd1LRlERVzPhGy0uoB5mxydo6AArifybhXmBDL_1i6PbMOktyveBcnknoJfyslNnO4Tc7edxWZx_oBOM1zAJnpoZGlJoCZlN6kW9o49AlvY4DuNPDXUSEOO6A1Bd7bgZFDVJ3OgsGaoFTdBrX1CAVapcy8';
|
||||
|
||||
const decoded = jwt.decode(token, {complete: false});
|
||||
console.log(decoded);
|
||||
@@ -0,0 +1,36 @@
|
||||
// -----------------------------------------------------------
|
||||
// 1. Hier Ihr ID Token einfügen:
|
||||
const idToken =
|
||||
'eyJraWQiOiJkZWZhdWx0UlNBU2lnbiIsImFsZyI6IlJTMjU2In0.eyJhdF9oYXNoIjoibVJpdzR3cDVKMUw0bzgtenVaWnlMQSIsInN1YiI6InM1MTgxNzAxQHVuaS1mcmFua2Z1cnQuZGUiLCJhdWQiOiIxY2FjM2Y5OS0zM2ZhLTQyMzQtODQzOC05NzlmMDdlMGNkYWIiLCJhdXRoX3RpbWUiOjE3NjU5Njc1NjEsImlzcyI6Imh0dHBzOi8vaWRwNS10ZXN0LnViLnVuaS1mcmFua2Z1cnQuZGUiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzNTE4MTcwMSIsImV4cCI6MTc2NTk3MTE2OSwiaWF0IjoxNzY1OTY3NTY5LCJzaWQiOiJfNTg1NmVkOGNlZmNlZTQ2ODQ0OTA4YTM0ZjNlZTQxMWQifQ.eDbIPjB6zeYiHrbYwqxG2_iV6loJHcvA3l0BT9W0kT4_NZxVVXL_OK7Z-qnC4ppw-SwPzUP7KSiFVBmSiqjQsTF9JWx7xWgcNo9MDxn8MT7F8T_a0CuaAKQtVMn9_adOyyiGgLiQ7_aSwnE0NfE_RomE3pWCQwK1-hr4au3QKR-MKwZehrDdcq0pmAzmCrlWJ8SZ6DmcErxvyXZ799LTjj2Vyn4kpp2uXWTuA5TxgpoKGdeVfTPzD6s6ZRshoVR1bLpkZbIYviE9mtDOw9RmAvZbdZ4-ZVDBX6AXktfq7WnNLDyT43pKRRql3oqdOVs9BD7e7LdJQRy4HgcK5IluSsEXuGNSV_iysvd3HV0yoLFXBkKiRnWsa0-U1WNz-Rnxb4OL_6ZxEfEjWIrdHxnDbbzq0iQomEeAaJRHU9FUSdch5NnHKpPz3W9cbd_9a9geMn5FXkGWwZKOVFPOQEPNBwVflpp_vYzGad0pvOTRSX4lMFnZ0FA1ADuUXuqaOJCk';
|
||||
// -----------------------------------------------------------
|
||||
|
||||
// Payload isolieren
|
||||
const payloadBase64 = idToken.split('.')[1];
|
||||
|
||||
// Base64Url in Base64 konvertieren und dekodieren
|
||||
try {
|
||||
const sanitizedPayload = payloadBase64.replace(/-/g, '+').replace(/_/g, '/');
|
||||
|
||||
// HINWEIS: Manchmal muss Padding (das '=' am Ende) hinzugefügt werden,
|
||||
// aber moderne Browser-Implementierungen kommen oft ohne aus.
|
||||
|
||||
// Dekodieren des Base64-Strings zur JSON-Zeichenkette
|
||||
const jsonPayload = decodeURIComponent(
|
||||
atob(sanitizedPayload)
|
||||
.split('')
|
||||
.map(function (c) {
|
||||
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
||||
})
|
||||
.join(''),
|
||||
);
|
||||
|
||||
// Parsen in ein JavaScript-Objekt
|
||||
const claims = JSON.parse(jsonPayload);
|
||||
|
||||
console.log('*** Erfolgreich dekodierte ID Token Claims ***');
|
||||
console.table(claims); // Zeigt die Claims in einer schönen Tabelle an
|
||||
console.log(claims);
|
||||
} catch (e) {
|
||||
console.error('Fehler beim Dekodieren des ID Tokens. Haben Sie das gesamte Token korrekt eingefügt?');
|
||||
console.error(e);
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/database
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b40ba7ad: Updated Elasticsearch dependency
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM elasticsearch:8.4.2
|
||||
FROM elasticsearch:8.14.3
|
||||
|
||||
EXPOSE 9200
|
||||
EXPOSE 9300
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/database",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"private": true,
|
||||
"files": [
|
||||
"config",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @openstapps/proxy
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/proxy",
|
||||
"description": "NGINX proxy that is dynamically configured by a Node.js script",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.2",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/backend-config
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/backend-config",
|
||||
"description": "Backend Configuration for OpenStApps",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.3",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<group title="canteen" title.de="Mensa" icon="local_cafe" route="/canteen"/>
|
||||
<group title="campus map" title.de="Campus Karte" icon="map" route="/map"/>
|
||||
<group title="my app" title.de="Meine App" icon="school" route="/profile">
|
||||
<item title="favorites" title.de="Favoriten" icon="grade" route="/favorites"/>
|
||||
<item title="favorites" title.de="Favoriten" icon="star" route="/favorites"/>
|
||||
<item title="schedule" title.de="Stundenplan" icon="calendar_today" route="/schedule"/>
|
||||
<item title="library account" title.de="Bibliothekskonto" icon="badge" route="/library-account" authProvider="paia"/>
|
||||
<item title="settings" title.de="Einstellungen" icon="settings" route="/settings"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<group title="canteen" title.de="Mensa" icon="local_cafe" route="/canteen"/>
|
||||
<group title="campus map" title.de="Campus Karte" icon="map" route="/map"/>
|
||||
<group title="my app" title.de="Meine App" icon="school" route="/profile">
|
||||
<item title="favorites" title.de="Favoriten" icon="grade" route="/favorites"/>
|
||||
<item title="favorites" title.de="Favoriten" icon="star" route="/favorites"/>
|
||||
<item title="schedule" title.de="Stundenplan" icon="calendar_today" route="/schedule"/>
|
||||
<item title="library account" title.de="Bibliothekskonto" icon="badge" route="/library-account" authProvider="paia"/>
|
||||
<item title="settings" title.de="Einstellungen" icon="settings" route="/settings"/>
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/eslint-config
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/eslint-config",
|
||||
"description": "A collection of configuration base files for StApps projects. Just an (unused) experiment for now.",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.3",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/eslint-config.git",
|
||||
@@ -22,8 +22,8 @@
|
||||
"typescript": "5.4.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "7.2.0",
|
||||
"@typescript-eslint/parser": "7.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "7.11.0",
|
||||
"@typescript-eslint/parser": "7.11.0",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-plugin-jsdoc": "48.2.1",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @openstapps/projectmanagement
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/gitlab-api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b40ba7ad: Updated Elasticsearch dependency
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/projectmanagement",
|
||||
"description": "Main documentation and scripts for maintenance.",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.2",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
@@ -41,10 +41,9 @@
|
||||
"@openstapps/collection-utils": "workspace:*",
|
||||
"@openstapps/gitlab-api": "workspace:*",
|
||||
"@openstapps/logger": "workspace:*",
|
||||
"@slack/web-api": "6.8.1",
|
||||
"commander": "10.0.0",
|
||||
"date-fns": "3.6.0",
|
||||
"glob": "10.3.10",
|
||||
"glob": "10.5.0",
|
||||
"mustache": "4.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -22,7 +22,6 @@ import {
|
||||
User,
|
||||
} from '@openstapps/gitlab-api';
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import {WebClient} from '@slack/web-api';
|
||||
import {CONCURRENCY, GROUPS, MAX_DEPTH_FOR_REMINDER, NOTE_PREFIX, SLACK_CHANNEL} from '../configuration.js';
|
||||
import {mapAsyncLimit} from '@openstapps/collection-utils';
|
||||
|
||||
@@ -53,8 +52,7 @@ export async function remind(api: Api): Promise<void> {
|
||||
Logger.info(`Found ${mergeRequests.length} open merge requests.`);
|
||||
|
||||
// instantiate slack client
|
||||
const client =
|
||||
process.env.SLACK_API_TOKEN === undefined ? undefined : new WebClient(process.env.SLACK_API_TOKEN);
|
||||
const client = undefined;
|
||||
|
||||
// get members of the main group
|
||||
const members = await api.getMembers(MembershipScope.GROUPS, GROUPS[0]);
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
# @openstapps/minimal-connector
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b40ba7ad]
|
||||
- @openstapps/api@4.0.1
|
||||
- @openstapps/core@4.0.0
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-connector",
|
||||
"description": "This is a minimal connector which serves as an example",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.2",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/minimal-deployment
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b40ba7ad: Updated Elasticsearch dependency
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
version: '3.7'
|
||||
|
||||
x-development-variables: &development-variables
|
||||
NODE_ENV: "development"
|
||||
ALLOW_NO_TRANSPORT: "true"
|
||||
|
||||
services:
|
||||
database:
|
||||
image: registry.gitlab.com/openstapps/openstapps/database:3.0.0
|
||||
image: registry.gitlab.com/openstapps/openstapps/database:4.0.1
|
||||
# If you need persistence for debugging purposes uncomment the following lines
|
||||
#volumes:
|
||||
# volumes:
|
||||
# - ./database:/usr/share/elasticsearch/data
|
||||
expose:
|
||||
- 9200
|
||||
ports:
|
||||
- 127.0.0.1:9200:9200
|
||||
environment:
|
||||
- bootstrap.memory_lock=true
|
||||
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
|
||||
- discovery.type=single-node
|
||||
# - bootstrap.memory_lock=true
|
||||
# - discovery.type=single-node
|
||||
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
@@ -25,7 +23,7 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
backend:
|
||||
image: registry.gitlab.com/openstapps/openstapps/backend:3.1.0
|
||||
image: registry.gitlab.com/openstapps/openstapps/backend:4.0.1
|
||||
environment:
|
||||
<<: *development-variables
|
||||
ES_ADDR: "http://database:9200"
|
||||
@@ -37,10 +35,11 @@ services:
|
||||
ports:
|
||||
- 127.0.0.1:3000:3000
|
||||
labels:
|
||||
- stapps.version=4.1.0
|
||||
- stapps.version=4.0.0
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- database
|
||||
database:
|
||||
condition: service_healthy
|
||||
links:
|
||||
- database
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-deployment",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"private": true,
|
||||
"files": [
|
||||
"database",
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
# @openstapps/minimal-plugin
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/api-plugin@4.0.2
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/core-tools@4.0.2
|
||||
- @openstapps/api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b40ba7ad: Updated Elasticsearch dependency
|
||||
- Updated dependencies [b40ba7ad]
|
||||
- @openstapps/api-plugin@4.0.1
|
||||
- @openstapps/api@4.0.1
|
||||
- @openstapps/core@4.0.0
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-plugin",
|
||||
"description": "Minimal Plugin",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.2",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
@@ -34,7 +34,7 @@
|
||||
"@openstapps/core-tools": "workspace:*",
|
||||
"@openstapps/logger": "workspace:*",
|
||||
"commander": "10.0.0",
|
||||
"express": "4.18.2",
|
||||
"express": "4.21.2",
|
||||
"ts-node": "10.9.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,30 @@
|
||||
# @openstapps/app
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
- @openstapps/api@4.0.2
|
||||
- @openstapps/collection-utils@4.0.0
|
||||
- @openstapps/core@4.0.2
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b40ba7ad: Updated Elasticsearch dependency
|
||||
- Updated dependencies [b40ba7ad]
|
||||
- @openstapps/api@4.0.1
|
||||
- @openstapps/core@4.0.0
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
namespace "de.anyschool.app"
|
||||
compileSdk rootProject.ext.compileSdkVersion
|
||||
namespace = "de.anyschool.app"
|
||||
compileSdk = rootProject.ext.compileSdkVersion
|
||||
defaultConfig {
|
||||
applicationId "de.anyschool.app"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
@@ -13,7 +13,7 @@ android {
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
|
||||
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
||||
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
|
||||
android {
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
sourceCompatibility JavaVersion.VERSION_21
|
||||
targetCompatibility JavaVersion.VERSION_21
|
||||
}
|
||||
}
|
||||
|
||||
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
|
||||
dependencies {
|
||||
implementation project(':capacitor-community-in-app-review')
|
||||
implementation project(':capacitor-community-screen-brightness')
|
||||
implementation project(':capacitor-app')
|
||||
implementation project(':capacitor-browser')
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true">
|
||||
<activity
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation|density"
|
||||
android:exported="true"
|
||||
android:label="@string/title_activity_main"
|
||||
android:launchMode="singleTask"
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
[
|
||||
{
|
||||
"pkg": "@capacitor-community/in-app-review",
|
||||
"classpath": "com.getcapacitor.community.inappreview.InAppReviewPlugin"
|
||||
},
|
||||
{
|
||||
"pkg": "@capacitor-community/screen-brightness",
|
||||
"classpath": "com.elylucas.capscreenbrightness.ScreenBrightnessPlugin"
|
||||
|
||||
@@ -7,5 +7,6 @@
|
||||
<item name="android:statusBarColor">@color/colorPrimary</item>
|
||||
<item name="android:windowBackground">@color/colorPrimary</item>
|
||||
<item name="android:navigationBarColor">@color/colorBackground</item>
|
||||
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
@@ -17,6 +18,7 @@
|
||||
<item name="android:windowBackground">@color/colorPrimary</item>
|
||||
<item name="android:navigationBarColor">@color/colorBackground</item>
|
||||
<item name="android:windowLightNavigationBar" tools:targetApi="27">true</item>
|
||||
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.2.1'
|
||||
classpath 'com.google.gms:google-services:4.4.0'
|
||||
classpath 'com.android.tools.build:gradle:8.13.0'
|
||||
classpath 'com.google.gms:google-services:4.4.4'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
@@ -1,57 +1,60 @@
|
||||
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
|
||||
include ':capacitor-android'
|
||||
project(':capacitor-android').projectDir = new File('../../../node_modules/.pnpm/@capacitor+android@6.2.1_@capacitor+core@6.2.1/node_modules/@capacitor/android/capacitor')
|
||||
project(':capacitor-android').projectDir = new File('../../../node_modules/.pnpm/@capacitor+android@8.2.0_@capacitor+core@8.2.0/node_modules/@capacitor/android/capacitor')
|
||||
|
||||
include ':capacitor-community-in-app-review'
|
||||
project(':capacitor-community-in-app-review').projectDir = new File('../../../node_modules/.pnpm/@capacitor-community+in-app-review@8.0.0_@capacitor+core@8.2.0/node_modules/@capacitor-community/in-app-review/android')
|
||||
|
||||
include ':capacitor-community-screen-brightness'
|
||||
project(':capacitor-community-screen-brightness').projectDir = new File('../../../node_modules/.pnpm/@capacitor-community+screen-brightness@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor-community/screen-brightness/android')
|
||||
project(':capacitor-community-screen-brightness').projectDir = new File('../../../node_modules/.pnpm/@capacitor-community+screen-brightness@8.0.0_@capacitor+core@8.2.0/node_modules/@capacitor-community/screen-brightness/android')
|
||||
|
||||
include ':capacitor-app'
|
||||
project(':capacitor-app').projectDir = new File('../../../node_modules/.pnpm/@capacitor+app@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/app/android')
|
||||
project(':capacitor-app').projectDir = new File('../../../node_modules/.pnpm/@capacitor+app@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/app/android')
|
||||
|
||||
include ':capacitor-browser'
|
||||
project(':capacitor-browser').projectDir = new File('../../../node_modules/.pnpm/@capacitor+browser@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/browser/android')
|
||||
project(':capacitor-browser').projectDir = new File('../../../node_modules/.pnpm/@capacitor+browser@8.0.2_@capacitor+core@8.2.0/node_modules/@capacitor/browser/android')
|
||||
|
||||
include ':capacitor-clipboard'
|
||||
project(':capacitor-clipboard').projectDir = new File('../../../node_modules/.pnpm/@capacitor+clipboard@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/clipboard/android')
|
||||
project(':capacitor-clipboard').projectDir = new File('../../../node_modules/.pnpm/@capacitor+clipboard@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/clipboard/android')
|
||||
|
||||
include ':capacitor-device'
|
||||
project(':capacitor-device').projectDir = new File('../../../node_modules/.pnpm/@capacitor+device@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/device/android')
|
||||
project(':capacitor-device').projectDir = new File('../../../node_modules/.pnpm/@capacitor+device@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/device/android')
|
||||
|
||||
include ':capacitor-dialog'
|
||||
project(':capacitor-dialog').projectDir = new File('../../../node_modules/.pnpm/@capacitor+dialog@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/dialog/android')
|
||||
project(':capacitor-dialog').projectDir = new File('../../../node_modules/.pnpm/@capacitor+dialog@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/dialog/android')
|
||||
|
||||
include ':capacitor-filesystem'
|
||||
project(':capacitor-filesystem').projectDir = new File('../../../node_modules/.pnpm/@capacitor+filesystem@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/filesystem/android')
|
||||
project(':capacitor-filesystem').projectDir = new File('../../../node_modules/.pnpm/@capacitor+filesystem@8.1.2_@capacitor+core@8.2.0/node_modules/@capacitor/filesystem/android')
|
||||
|
||||
include ':capacitor-geolocation'
|
||||
project(':capacitor-geolocation').projectDir = new File('../../../node_modules/.pnpm/@capacitor+geolocation@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/geolocation/android')
|
||||
project(':capacitor-geolocation').projectDir = new File('../../../node_modules/.pnpm/@capacitor+geolocation@8.1.0_@capacitor+core@8.2.0/node_modules/@capacitor/geolocation/android')
|
||||
|
||||
include ':capacitor-haptics'
|
||||
project(':capacitor-haptics').projectDir = new File('../../../node_modules/.pnpm/@capacitor+haptics@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/haptics/android')
|
||||
project(':capacitor-haptics').projectDir = new File('../../../node_modules/.pnpm/@capacitor+haptics@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/haptics/android')
|
||||
|
||||
include ':capacitor-keyboard'
|
||||
project(':capacitor-keyboard').projectDir = new File('../../../node_modules/.pnpm/@capacitor+keyboard@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/keyboard/android')
|
||||
project(':capacitor-keyboard').projectDir = new File('../../../node_modules/.pnpm/@capacitor+keyboard@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/keyboard/android')
|
||||
|
||||
include ':capacitor-local-notifications'
|
||||
project(':capacitor-local-notifications').projectDir = new File('../../../node_modules/.pnpm/@capacitor+local-notifications@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/local-notifications/android')
|
||||
project(':capacitor-local-notifications').projectDir = new File('../../../node_modules/.pnpm/@capacitor+local-notifications@8.0.2_@capacitor+core@8.2.0/node_modules/@capacitor/local-notifications/android')
|
||||
|
||||
include ':capacitor-network'
|
||||
project(':capacitor-network').projectDir = new File('../../../node_modules/.pnpm/@capacitor+network@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/network/android')
|
||||
project(':capacitor-network').projectDir = new File('../../../node_modules/.pnpm/@capacitor+network@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/network/android')
|
||||
|
||||
include ':capacitor-preferences'
|
||||
project(':capacitor-preferences').projectDir = new File('../../../node_modules/.pnpm/@capacitor+preferences@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/preferences/android')
|
||||
project(':capacitor-preferences').projectDir = new File('../../../node_modules/.pnpm/@capacitor+preferences@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/preferences/android')
|
||||
|
||||
include ':capacitor-screen-orientation'
|
||||
project(':capacitor-screen-orientation').projectDir = new File('../../../node_modules/.pnpm/@capacitor+screen-orientation@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/screen-orientation/android')
|
||||
project(':capacitor-screen-orientation').projectDir = new File('../../../node_modules/.pnpm/@capacitor+screen-orientation@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/screen-orientation/android')
|
||||
|
||||
include ':capacitor-share'
|
||||
project(':capacitor-share').projectDir = new File('../../../node_modules/.pnpm/@capacitor+share@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/share/android')
|
||||
project(':capacitor-share').projectDir = new File('../../../node_modules/.pnpm/@capacitor+share@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/share/android')
|
||||
|
||||
include ':capacitor-splash-screen'
|
||||
project(':capacitor-splash-screen').projectDir = new File('../../../node_modules/.pnpm/@capacitor+splash-screen@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/splash-screen/android')
|
||||
project(':capacitor-splash-screen').projectDir = new File('../../../node_modules/.pnpm/@capacitor+splash-screen@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/splash-screen/android')
|
||||
|
||||
include ':transistorsoft-capacitor-background-fetch'
|
||||
project(':transistorsoft-capacitor-background-fetch').projectDir = new File('../../../node_modules/.pnpm/@transistorsoft+capacitor-background-fetch@6.0.0_@capacitor+core@6.2.1/node_modules/@transistorsoft/capacitor-background-fetch/android')
|
||||
project(':transistorsoft-capacitor-background-fetch').projectDir = new File('../../../node_modules/.pnpm/@transistorsoft+capacitor-background-fetch@8.0.0_@capacitor+core@8.2.0/node_modules/@transistorsoft/capacitor-background-fetch/android')
|
||||
|
||||
include ':capacitor-secure-storage-plugin'
|
||||
project(':capacitor-secure-storage-plugin').projectDir = new File('../../../node_modules/.pnpm/capacitor-secure-storage-plugin@0.10.0_@capacitor+core@6.2.1/node_modules/capacitor-secure-storage-plugin/android')
|
||||
project(':capacitor-secure-storage-plugin').projectDir = new File('../../../node_modules/.pnpm/capacitor-secure-storage-plugin@0.13.0_@capacitor+core@8.2.0/node_modules/capacitor-secure-storage-plugin/android')
|
||||
|
||||
Binary file not shown.
@@ -1,6 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
Vendored
+22
-15
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -55,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -83,10 +85,8 @@ done
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -114,7 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -133,10 +133,13 @@ location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
@@ -144,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
@@ -152,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -197,16 +200,20 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
Vendored
+14
-12
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
@@ -57,22 +59,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
ext {
|
||||
minSdkVersion = 22
|
||||
compileSdkVersion = 34
|
||||
targetSdkVersion = 34
|
||||
androidxActivityVersion = '1.8.0'
|
||||
androidxAppCompatVersion = '1.6.1'
|
||||
androidxCoordinatorLayoutVersion = '1.2.0'
|
||||
androidxCoreVersion = '1.12.0'
|
||||
androidxFragmentVersion = '1.6.2'
|
||||
coreSplashScreenVersion = '1.0.1'
|
||||
androidxWebkitVersion = '1.9.0'
|
||||
minSdkVersion = 24
|
||||
compileSdkVersion = 36
|
||||
targetSdkVersion = 36
|
||||
androidxActivityVersion = '1.11.0'
|
||||
androidxAppCompatVersion = '1.7.1'
|
||||
androidxCoordinatorLayoutVersion = '1.3.0'
|
||||
androidxCoreVersion = '1.17.0'
|
||||
androidxFragmentVersion = '1.8.9'
|
||||
coreSplashScreenVersion = '1.2.0'
|
||||
androidxWebkitVersion = '1.14.0'
|
||||
junitVersion = '4.13.2'
|
||||
androidxJunitVersion = '1.1.5'
|
||||
androidxEspressoCoreVersion = '3.5.1'
|
||||
cordovaAndroidVersion = '10.1.1'
|
||||
androidxJunitVersion = '1.3.0'
|
||||
androidxEspressoCoreVersion = '3.7.0'
|
||||
cordovaAndroidVersion = '14.0.1'
|
||||
}
|
||||
@@ -175,16 +175,6 @@
|
||||
"hisometry": {
|
||||
"authProvider": "default",
|
||||
"url": "https://his-self-service.rz.uni-frankfurt.de"
|
||||
},
|
||||
"daia": {
|
||||
"url": "https://daia.hebis.de/DAIA2/UB_Frankfurt"
|
||||
},
|
||||
"hebisProxy": {
|
||||
"url": "https://proxy.ub.uni-frankfurt.de/login?qurl="
|
||||
},
|
||||
"paia": {
|
||||
"authProvider": "paia",
|
||||
"url": "https://hds.hebis.de/paia/core"
|
||||
}
|
||||
},
|
||||
"plugins": {
|
||||
@@ -193,9 +183,6 @@
|
||||
},
|
||||
"feedback": {
|
||||
"urlPath": "/feedback"
|
||||
},
|
||||
"hebis-plugin": {
|
||||
"urlPath": "/hebissearch"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -229,19 +216,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"icon": "local_library",
|
||||
"route": "/hebis-search",
|
||||
"title": "library catalog",
|
||||
"translations": {
|
||||
"de": {
|
||||
"title": "Bibliothekskatalog"
|
||||
},
|
||||
"en": {
|
||||
"title": "library catalog"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"icon": "inventory_2",
|
||||
"route": "/catalog",
|
||||
@@ -299,7 +273,7 @@
|
||||
"icon": "school",
|
||||
"items": [
|
||||
{
|
||||
"icon": "grade",
|
||||
"icon": "star",
|
||||
"route": "/favorites",
|
||||
"title": "favorites",
|
||||
"translations": {
|
||||
@@ -324,20 +298,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"authProvider": "paia",
|
||||
"icon": "badge",
|
||||
"route": "/library-account",
|
||||
"title": "library account",
|
||||
"translations": {
|
||||
"de": {
|
||||
"title": "Bibliothekskonto"
|
||||
},
|
||||
"en": {
|
||||
"title": "library account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"icon": "settings",
|
||||
"route": "/settings",
|
||||
@@ -473,24 +433,6 @@
|
||||
"token": "https://cas.rz.uni-frankfurt.de/cas/oauth2.0/accessToken",
|
||||
"userinfo": "https://cas.rz.uni-frankfurt.de/cas/oauth2.0/profile"
|
||||
}
|
||||
},
|
||||
"paia": {
|
||||
"client": {
|
||||
"clientId": "",
|
||||
"scopes": "",
|
||||
"url": "https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php"
|
||||
},
|
||||
"endpoints": {
|
||||
"authorization": "https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php",
|
||||
"endSession": "https://ubffm.hds.hebis.de/Shibboleth.sso/Logout",
|
||||
"mapping": {
|
||||
"id": "$.email",
|
||||
"name": "$.name",
|
||||
"role": "$.type"
|
||||
},
|
||||
"token": "https://hds.hebis.de/paia/auth/login",
|
||||
"userinfo": "https://hds.hebis.de/paia/core"
|
||||
}
|
||||
}
|
||||
},
|
||||
"backend": {
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
*/
|
||||
|
||||
describe('context menu', function () {
|
||||
const contextMenuSelector = 'stapps-context-menu-modal';
|
||||
|
||||
beforeEach(function () {
|
||||
cy.interceptSearch({
|
||||
extends: {query: 'a'},
|
||||
@@ -33,21 +35,21 @@ describe('context menu', function () {
|
||||
});
|
||||
|
||||
it('should sort', function () {
|
||||
cy.get('stapps-context').within(() => {
|
||||
cy.get(contextMenuSelector).within(() => {
|
||||
cy.contains('ion-item', 'Name').click();
|
||||
cy.wait('@search');
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter', function () {
|
||||
cy.get('stapps-context').within(() => {
|
||||
cy.get(contextMenuSelector).within(() => {
|
||||
cy.contains('ion-item', '(17) Akademische Veranstaltung').click();
|
||||
cy.wait('@search');
|
||||
});
|
||||
});
|
||||
|
||||
it('should have a working delete button', function () {
|
||||
cy.get('stapps-context').within(() => {
|
||||
cy.get(contextMenuSelector).within(() => {
|
||||
cy.contains('ion-item', '(17) Akademische Veranstaltung').click();
|
||||
|
||||
cy.get('.checkbox-checked').should('have.length', 1);
|
||||
@@ -60,7 +62,7 @@ describe('context menu', function () {
|
||||
it('should truncate long category items', function () {
|
||||
cy.contains('ion-list', 'Akademische Veranstaltung / Kategorien').within(() => {
|
||||
cy.contains('ion-item', '(1) Tutorium').should('not.exist');
|
||||
cy.get('div > ion-button').click();
|
||||
cy.get('ion-button').click();
|
||||
cy.contains('ion-item', '(1) Tutorium').should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -33,9 +33,9 @@ describe('dashboard', async function () {
|
||||
describe('schedule section', function () {
|
||||
it('should lead to the week overview', function () {
|
||||
cy.get('.schedule')
|
||||
.contains('a', /Wochen.*übersicht/)
|
||||
.contains('a', /Wochen.*ansicht/)
|
||||
.click();
|
||||
cy.url().should('include', '/schedule/week-overview');
|
||||
cy.url().should('include', '/schedule/weekly-view');
|
||||
});
|
||||
|
||||
it('should lead to the calendar', function () {
|
||||
|
||||
@@ -100,7 +100,7 @@ describe('schedule', function () {
|
||||
cy.get('ion-searchbar').click().type('a');
|
||||
cy.wait('@search');
|
||||
cy.wait('@chips');
|
||||
cy.wait(200);
|
||||
cy.wait(1000);
|
||||
cy.contains('ion-item', 'UNIcert (Test)')
|
||||
.contains('stapps-add-event-action-chip', 'Termine Auswählen')
|
||||
.click();
|
||||
|
||||
@@ -20,7 +20,7 @@ const config = {
|
||||
htmlGlob: 'src/**/*.html',
|
||||
scriptGlob: 'src/**/*.ts',
|
||||
additionalIcons: {
|
||||
about: ['copyright', 'campaign', 'policy', 'description', 'text_snippet'],
|
||||
about: ['copyright', 'campaign', 'policy', 'description', 'text_snippet', 'expand_more', 'expand_all'],
|
||||
navigation: [
|
||||
'home',
|
||||
'newspaper',
|
||||
@@ -30,7 +30,7 @@ const config = {
|
||||
'local_library',
|
||||
'inventory_2',
|
||||
'map',
|
||||
'grade',
|
||||
'star',
|
||||
'account_circle',
|
||||
'settings',
|
||||
'info',
|
||||
|
||||
@@ -109,7 +109,6 @@
|
||||
504EC3011FED79650016851F /* Frameworks */,
|
||||
504EC3021FED79650016851F /* Resources */,
|
||||
F40DBF7576173B02228B7A71 /* [CP] Embed Pods Frameworks */,
|
||||
2D217985258DD775FC9B6A72 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -171,21 +170,6 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
2D217985258DD775FC9B6A72 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
947055B15D65E7FC3ADB1FEB /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -304,7 +288,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
@@ -355,7 +339,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
@@ -373,7 +357,7 @@
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = YSGS9WV338;
|
||||
INFOPLIST_FILE = App/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = de.openstapps.app;
|
||||
@@ -395,7 +379,7 @@
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = YSGS9WV338;
|
||||
INFOPLIST_FILE = App/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = de.openstapps.app;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require_relative '../../../../node_modules/.pnpm/@capacitor+ios@6.2.1_@capacitor+core@6.2.1/node_modules/@capacitor/ios/scripts/pods_helpers'
|
||||
require_relative '../../../../node_modules/.pnpm/@capacitor+ios@8.2.0_@capacitor+core@8.2.0/node_modules/@capacitor/ios/scripts/pods_helpers'
|
||||
|
||||
platform :ios, '13.0'
|
||||
platform :ios, '15.0'
|
||||
use_frameworks!
|
||||
|
||||
# workaround to avoid Xcode caching of Pods that requires
|
||||
@@ -9,26 +9,27 @@ use_frameworks!
|
||||
install! 'cocoapods', :disable_input_output_paths => true
|
||||
|
||||
def capacitor_pods
|
||||
pod 'Capacitor', :path => '../../../../node_modules/.pnpm/@capacitor+ios@6.2.1_@capacitor+core@6.2.1/node_modules/@capacitor/ios'
|
||||
pod 'CapacitorCordova', :path => '../../../../node_modules/.pnpm/@capacitor+ios@6.2.1_@capacitor+core@6.2.1/node_modules/@capacitor/ios'
|
||||
pod 'CapacitorCommunityScreenBrightness', :path => '../../../../node_modules/.pnpm/@capacitor-community+screen-brightness@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor-community/screen-brightness'
|
||||
pod 'CapacitorApp', :path => '../../../../node_modules/.pnpm/@capacitor+app@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/app'
|
||||
pod 'CapacitorBrowser', :path => '../../../../node_modules/.pnpm/@capacitor+browser@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/browser'
|
||||
pod 'CapacitorClipboard', :path => '../../../../node_modules/.pnpm/@capacitor+clipboard@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/clipboard'
|
||||
pod 'CapacitorDevice', :path => '../../../../node_modules/.pnpm/@capacitor+device@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/device'
|
||||
pod 'CapacitorDialog', :path => '../../../../node_modules/.pnpm/@capacitor+dialog@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/dialog'
|
||||
pod 'CapacitorFilesystem', :path => '../../../../node_modules/.pnpm/@capacitor+filesystem@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/filesystem'
|
||||
pod 'CapacitorGeolocation', :path => '../../../../node_modules/.pnpm/@capacitor+geolocation@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/geolocation'
|
||||
pod 'CapacitorHaptics', :path => '../../../../node_modules/.pnpm/@capacitor+haptics@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/haptics'
|
||||
pod 'CapacitorKeyboard', :path => '../../../../node_modules/.pnpm/@capacitor+keyboard@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/keyboard'
|
||||
pod 'CapacitorLocalNotifications', :path => '../../../../node_modules/.pnpm/@capacitor+local-notifications@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/local-notifications'
|
||||
pod 'CapacitorNetwork', :path => '../../../../node_modules/.pnpm/@capacitor+network@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/network'
|
||||
pod 'CapacitorPreferences', :path => '../../../../node_modules/.pnpm/@capacitor+preferences@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/preferences'
|
||||
pod 'CapacitorScreenOrientation', :path => '../../../../node_modules/.pnpm/@capacitor+screen-orientation@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/screen-orientation'
|
||||
pod 'CapacitorShare', :path => '../../../../node_modules/.pnpm/@capacitor+share@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/share'
|
||||
pod 'CapacitorSplashScreen', :path => '../../../../node_modules/.pnpm/@capacitor+splash-screen@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/splash-screen'
|
||||
pod 'TransistorsoftCapacitorBackgroundFetch', :path => '../../../../node_modules/.pnpm/@transistorsoft+capacitor-background-fetch@6.0.0_@capacitor+core@6.2.1/node_modules/@transistorsoft/capacitor-background-fetch'
|
||||
pod 'CapacitorSecureStoragePlugin', :path => '../../../../node_modules/.pnpm/capacitor-secure-storage-plugin@0.10.0_@capacitor+core@6.2.1/node_modules/capacitor-secure-storage-plugin'
|
||||
pod 'Capacitor', :path => '../../../../node_modules/.pnpm/@capacitor+ios@8.2.0_@capacitor+core@8.2.0/node_modules/@capacitor/ios'
|
||||
pod 'CapacitorCordova', :path => '../../../../node_modules/.pnpm/@capacitor+ios@8.2.0_@capacitor+core@8.2.0/node_modules/@capacitor/ios'
|
||||
pod 'CapacitorCommunityInAppReview', :path => '../../../../node_modules/.pnpm/@capacitor-community+in-app-review@8.0.0_@capacitor+core@8.2.0/node_modules/@capacitor-community/in-app-review'
|
||||
pod 'CapacitorCommunityScreenBrightness', :path => '../../../../node_modules/.pnpm/@capacitor-community+screen-brightness@8.0.0_@capacitor+core@8.2.0/node_modules/@capacitor-community/screen-brightness'
|
||||
pod 'CapacitorApp', :path => '../../../../node_modules/.pnpm/@capacitor+app@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/app'
|
||||
pod 'CapacitorBrowser', :path => '../../../../node_modules/.pnpm/@capacitor+browser@8.0.2_@capacitor+core@8.2.0/node_modules/@capacitor/browser'
|
||||
pod 'CapacitorClipboard', :path => '../../../../node_modules/.pnpm/@capacitor+clipboard@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/clipboard'
|
||||
pod 'CapacitorDevice', :path => '../../../../node_modules/.pnpm/@capacitor+device@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/device'
|
||||
pod 'CapacitorDialog', :path => '../../../../node_modules/.pnpm/@capacitor+dialog@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/dialog'
|
||||
pod 'CapacitorFilesystem', :path => '../../../../node_modules/.pnpm/@capacitor+filesystem@8.1.2_@capacitor+core@8.2.0/node_modules/@capacitor/filesystem'
|
||||
pod 'CapacitorGeolocation', :path => '../../../../node_modules/.pnpm/@capacitor+geolocation@8.1.0_@capacitor+core@8.2.0/node_modules/@capacitor/geolocation'
|
||||
pod 'CapacitorHaptics', :path => '../../../../node_modules/.pnpm/@capacitor+haptics@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/haptics'
|
||||
pod 'CapacitorKeyboard', :path => '../../../../node_modules/.pnpm/@capacitor+keyboard@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/keyboard'
|
||||
pod 'CapacitorLocalNotifications', :path => '../../../../node_modules/.pnpm/@capacitor+local-notifications@8.0.2_@capacitor+core@8.2.0/node_modules/@capacitor/local-notifications'
|
||||
pod 'CapacitorNetwork', :path => '../../../../node_modules/.pnpm/@capacitor+network@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/network'
|
||||
pod 'CapacitorPreferences', :path => '../../../../node_modules/.pnpm/@capacitor+preferences@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/preferences'
|
||||
pod 'CapacitorScreenOrientation', :path => '../../../../node_modules/.pnpm/@capacitor+screen-orientation@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/screen-orientation'
|
||||
pod 'CapacitorShare', :path => '../../../../node_modules/.pnpm/@capacitor+share@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/share'
|
||||
pod 'CapacitorSplashScreen', :path => '../../../../node_modules/.pnpm/@capacitor+splash-screen@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/splash-screen'
|
||||
pod 'TransistorsoftCapacitorBackgroundFetch', :path => '../../../../node_modules/.pnpm/@transistorsoft+capacitor-background-fetch@8.0.0_@capacitor+core@8.2.0/node_modules/@transistorsoft/capacitor-background-fetch'
|
||||
pod 'CapacitorSecureStoragePlugin', :path => '../../../../node_modules/.pnpm/capacitor-secure-storage-plugin@0.13.0_@capacitor+core@8.2.0/node_modules/capacitor-secure-storage-plugin'
|
||||
pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
|
||||
end
|
||||
|
||||
|
||||
@@ -1,143 +1,161 @@
|
||||
PODS:
|
||||
- Capacitor (6.2.1):
|
||||
- Capacitor (8.2.0):
|
||||
- CapacitorCordova
|
||||
- CapacitorApp (6.0.0):
|
||||
- CapacitorApp (8.0.1):
|
||||
- Capacitor
|
||||
- CapacitorBrowser (6.0.1):
|
||||
- CapacitorBrowser (8.0.2):
|
||||
- Capacitor
|
||||
- CapacitorClipboard (6.0.0):
|
||||
- CapacitorClipboard (8.0.1):
|
||||
- Capacitor
|
||||
- CapacitorCommunityScreenBrightness (6.0.0):
|
||||
- CapacitorCommunityInAppReview (8.0.0):
|
||||
- Capacitor
|
||||
- CapacitorCordova (6.2.1)
|
||||
- CapacitorDevice (6.0.0):
|
||||
- CapacitorCommunityScreenBrightness (8.0.0):
|
||||
- Capacitor
|
||||
- CapacitorDialog (6.0.0):
|
||||
- CapacitorCordova (8.2.0)
|
||||
- CapacitorDevice (8.0.1):
|
||||
- Capacitor
|
||||
- CapacitorFilesystem (6.0.0):
|
||||
- CapacitorDialog (8.0.1):
|
||||
- Capacitor
|
||||
- CapacitorGeolocation (6.0.0):
|
||||
- CapacitorFilesystem (8.1.2):
|
||||
- Capacitor
|
||||
- CapacitorHaptics (6.0.0):
|
||||
- IONFilesystemLib (~> 1.1.1)
|
||||
- CapacitorGeolocation (8.1.0):
|
||||
- Capacitor
|
||||
- CapacitorKeyboard (6.0.1):
|
||||
- IONGeolocationLib (= 2.0.0)
|
||||
- CapacitorHaptics (8.0.1):
|
||||
- Capacitor
|
||||
- CapacitorLocalNotifications (6.0.0):
|
||||
- CapacitorKeyboard (8.0.1):
|
||||
- Capacitor
|
||||
- CapacitorNetwork (6.0.1):
|
||||
- CapacitorLocalNotifications (8.0.2):
|
||||
- Capacitor
|
||||
- CapacitorPreferences (6.0.1):
|
||||
- CapacitorNetwork (8.0.1):
|
||||
- Capacitor
|
||||
- CapacitorScreenOrientation (6.0.1):
|
||||
- CapacitorPreferences (8.0.1):
|
||||
- Capacitor
|
||||
- CapacitorSecureStoragePlugin (0.10.0):
|
||||
- CapacitorScreenOrientation (8.0.1):
|
||||
- Capacitor
|
||||
- CapacitorSecureStoragePlugin (0.12.0):
|
||||
- Capacitor
|
||||
- SwiftKeychainWrapper
|
||||
- CapacitorShare (6.0.1):
|
||||
- CapacitorShare (8.0.1):
|
||||
- Capacitor
|
||||
- CapacitorSplashScreen (6.0.1):
|
||||
- CapacitorSplashScreen (8.0.1):
|
||||
- Capacitor
|
||||
- CordovaPlugins (6.2.1):
|
||||
- CordovaPlugins (8.2.0):
|
||||
- CapacitorCordova
|
||||
- IONFilesystemLib (1.1.2)
|
||||
- IONGeolocationLib (2.0.0)
|
||||
- SwiftKeychainWrapper (4.0.1)
|
||||
- TransistorsoftCapacitorBackgroundFetch (6.0.0):
|
||||
- TransistorsoftCapacitorBackgroundFetch (8.0.0):
|
||||
- Capacitor
|
||||
- TSBackgroundFetch (~> 4.0)
|
||||
- TSBackgroundFetch (4.0.6)
|
||||
|
||||
DEPENDENCIES:
|
||||
- "Capacitor (from `../../../../node_modules/.pnpm/@capacitor+ios@6.2.1_@capacitor+core@6.2.1/node_modules/@capacitor/ios`)"
|
||||
- "CapacitorApp (from `../../../../node_modules/.pnpm/@capacitor+app@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/app`)"
|
||||
- "CapacitorBrowser (from `../../../../node_modules/.pnpm/@capacitor+browser@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/browser`)"
|
||||
- "CapacitorClipboard (from `../../../../node_modules/.pnpm/@capacitor+clipboard@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/clipboard`)"
|
||||
- "CapacitorCommunityScreenBrightness (from `../../../../node_modules/.pnpm/@capacitor-community+screen-brightness@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor-community/screen-brightness`)"
|
||||
- "CapacitorCordova (from `../../../../node_modules/.pnpm/@capacitor+ios@6.2.1_@capacitor+core@6.2.1/node_modules/@capacitor/ios`)"
|
||||
- "CapacitorDevice (from `../../../../node_modules/.pnpm/@capacitor+device@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/device`)"
|
||||
- "CapacitorDialog (from `../../../../node_modules/.pnpm/@capacitor+dialog@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/dialog`)"
|
||||
- "CapacitorFilesystem (from `../../../../node_modules/.pnpm/@capacitor+filesystem@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/filesystem`)"
|
||||
- "CapacitorGeolocation (from `../../../../node_modules/.pnpm/@capacitor+geolocation@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/geolocation`)"
|
||||
- "CapacitorHaptics (from `../../../../node_modules/.pnpm/@capacitor+haptics@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/haptics`)"
|
||||
- "CapacitorKeyboard (from `../../../../node_modules/.pnpm/@capacitor+keyboard@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/keyboard`)"
|
||||
- "CapacitorLocalNotifications (from `../../../../node_modules/.pnpm/@capacitor+local-notifications@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/local-notifications`)"
|
||||
- "CapacitorNetwork (from `../../../../node_modules/.pnpm/@capacitor+network@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/network`)"
|
||||
- "CapacitorPreferences (from `../../../../node_modules/.pnpm/@capacitor+preferences@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/preferences`)"
|
||||
- "CapacitorScreenOrientation (from `../../../../node_modules/.pnpm/@capacitor+screen-orientation@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/screen-orientation`)"
|
||||
- "CapacitorSecureStoragePlugin (from `../../../../node_modules/.pnpm/capacitor-secure-storage-plugin@0.10.0_@capacitor+core@6.2.1/node_modules/capacitor-secure-storage-plugin`)"
|
||||
- "CapacitorShare (from `../../../../node_modules/.pnpm/@capacitor+share@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/share`)"
|
||||
- "CapacitorSplashScreen (from `../../../../node_modules/.pnpm/@capacitor+splash-screen@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/splash-screen`)"
|
||||
- "Capacitor (from `../../../../node_modules/.pnpm/@capacitor+ios@8.2.0_@capacitor+core@8.2.0/node_modules/@capacitor/ios`)"
|
||||
- "CapacitorApp (from `../../../../node_modules/.pnpm/@capacitor+app@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/app`)"
|
||||
- "CapacitorBrowser (from `../../../../node_modules/.pnpm/@capacitor+browser@8.0.2_@capacitor+core@8.2.0/node_modules/@capacitor/browser`)"
|
||||
- "CapacitorClipboard (from `../../../../node_modules/.pnpm/@capacitor+clipboard@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/clipboard`)"
|
||||
- "CapacitorCommunityInAppReview (from `../../../../node_modules/.pnpm/@capacitor-community+in-app-review@8.0.0_@capacitor+core@8.2.0/node_modules/@capacitor-community/in-app-review`)"
|
||||
- "CapacitorCommunityScreenBrightness (from `../../../../node_modules/.pnpm/@capacitor-community+screen-brightness@8.0.0_@capacitor+core@8.2.0/node_modules/@capacitor-community/screen-brightness`)"
|
||||
- "CapacitorCordova (from `../../../../node_modules/.pnpm/@capacitor+ios@8.2.0_@capacitor+core@8.2.0/node_modules/@capacitor/ios`)"
|
||||
- "CapacitorDevice (from `../../../../node_modules/.pnpm/@capacitor+device@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/device`)"
|
||||
- "CapacitorDialog (from `../../../../node_modules/.pnpm/@capacitor+dialog@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/dialog`)"
|
||||
- "CapacitorFilesystem (from `../../../../node_modules/.pnpm/@capacitor+filesystem@8.1.2_@capacitor+core@8.2.0/node_modules/@capacitor/filesystem`)"
|
||||
- "CapacitorGeolocation (from `../../../../node_modules/.pnpm/@capacitor+geolocation@8.1.0_@capacitor+core@8.2.0/node_modules/@capacitor/geolocation`)"
|
||||
- "CapacitorHaptics (from `../../../../node_modules/.pnpm/@capacitor+haptics@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/haptics`)"
|
||||
- "CapacitorKeyboard (from `../../../../node_modules/.pnpm/@capacitor+keyboard@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/keyboard`)"
|
||||
- "CapacitorLocalNotifications (from `../../../../node_modules/.pnpm/@capacitor+local-notifications@8.0.2_@capacitor+core@8.2.0/node_modules/@capacitor/local-notifications`)"
|
||||
- "CapacitorNetwork (from `../../../../node_modules/.pnpm/@capacitor+network@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/network`)"
|
||||
- "CapacitorPreferences (from `../../../../node_modules/.pnpm/@capacitor+preferences@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/preferences`)"
|
||||
- "CapacitorScreenOrientation (from `../../../../node_modules/.pnpm/@capacitor+screen-orientation@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/screen-orientation`)"
|
||||
- "CapacitorSecureStoragePlugin (from `../../../../node_modules/.pnpm/capacitor-secure-storage-plugin@0.12.0_@capacitor+core@8.2.0/node_modules/capacitor-secure-storage-plugin`)"
|
||||
- "CapacitorShare (from `../../../../node_modules/.pnpm/@capacitor+share@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/share`)"
|
||||
- "CapacitorSplashScreen (from `../../../../node_modules/.pnpm/@capacitor+splash-screen@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/splash-screen`)"
|
||||
- CordovaPlugins (from `../capacitor-cordova-ios-plugins`)
|
||||
- "TransistorsoftCapacitorBackgroundFetch (from `../../../../node_modules/.pnpm/@transistorsoft+capacitor-background-fetch@6.0.0_@capacitor+core@6.2.1/node_modules/@transistorsoft/capacitor-background-fetch`)"
|
||||
- "TransistorsoftCapacitorBackgroundFetch (from `../../../../node_modules/.pnpm/@transistorsoft+capacitor-background-fetch@8.0.0_@capacitor+core@8.2.0/node_modules/@transistorsoft/capacitor-background-fetch`)"
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- IONFilesystemLib
|
||||
- IONGeolocationLib
|
||||
- SwiftKeychainWrapper
|
||||
- TSBackgroundFetch
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Capacitor:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+ios@6.2.1_@capacitor+core@6.2.1/node_modules/@capacitor/ios"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+ios@8.2.0_@capacitor+core@8.2.0/node_modules/@capacitor/ios"
|
||||
CapacitorApp:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+app@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/app"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+app@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/app"
|
||||
CapacitorBrowser:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+browser@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/browser"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+browser@8.0.2_@capacitor+core@8.2.0/node_modules/@capacitor/browser"
|
||||
CapacitorClipboard:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+clipboard@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/clipboard"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+clipboard@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/clipboard"
|
||||
CapacitorCommunityInAppReview:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor-community+in-app-review@8.0.0_@capacitor+core@8.2.0/node_modules/@capacitor-community/in-app-review"
|
||||
CapacitorCommunityScreenBrightness:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor-community+screen-brightness@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor-community/screen-brightness"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor-community+screen-brightness@8.0.0_@capacitor+core@8.2.0/node_modules/@capacitor-community/screen-brightness"
|
||||
CapacitorCordova:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+ios@6.2.1_@capacitor+core@6.2.1/node_modules/@capacitor/ios"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+ios@8.2.0_@capacitor+core@8.2.0/node_modules/@capacitor/ios"
|
||||
CapacitorDevice:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+device@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/device"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+device@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/device"
|
||||
CapacitorDialog:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+dialog@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/dialog"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+dialog@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/dialog"
|
||||
CapacitorFilesystem:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+filesystem@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/filesystem"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+filesystem@8.1.2_@capacitor+core@8.2.0/node_modules/@capacitor/filesystem"
|
||||
CapacitorGeolocation:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+geolocation@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/geolocation"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+geolocation@8.1.0_@capacitor+core@8.2.0/node_modules/@capacitor/geolocation"
|
||||
CapacitorHaptics:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+haptics@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/haptics"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+haptics@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/haptics"
|
||||
CapacitorKeyboard:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+keyboard@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/keyboard"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+keyboard@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/keyboard"
|
||||
CapacitorLocalNotifications:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+local-notifications@6.0.0_@capacitor+core@6.2.1/node_modules/@capacitor/local-notifications"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+local-notifications@8.0.2_@capacitor+core@8.2.0/node_modules/@capacitor/local-notifications"
|
||||
CapacitorNetwork:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+network@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/network"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+network@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/network"
|
||||
CapacitorPreferences:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+preferences@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/preferences"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+preferences@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/preferences"
|
||||
CapacitorScreenOrientation:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+screen-orientation@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/screen-orientation"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+screen-orientation@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/screen-orientation"
|
||||
CapacitorSecureStoragePlugin:
|
||||
:path: "../../../../node_modules/.pnpm/capacitor-secure-storage-plugin@0.10.0_@capacitor+core@6.2.1/node_modules/capacitor-secure-storage-plugin"
|
||||
:path: "../../../../node_modules/.pnpm/capacitor-secure-storage-plugin@0.12.0_@capacitor+core@8.2.0/node_modules/capacitor-secure-storage-plugin"
|
||||
CapacitorShare:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+share@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/share"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+share@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/share"
|
||||
CapacitorSplashScreen:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+splash-screen@6.0.1_@capacitor+core@6.2.1/node_modules/@capacitor/splash-screen"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+splash-screen@8.0.1_@capacitor+core@8.2.0/node_modules/@capacitor/splash-screen"
|
||||
CordovaPlugins:
|
||||
:path: "../capacitor-cordova-ios-plugins"
|
||||
TransistorsoftCapacitorBackgroundFetch:
|
||||
:path: "../../../../node_modules/.pnpm/@transistorsoft+capacitor-background-fetch@6.0.0_@capacitor+core@6.2.1/node_modules/@transistorsoft/capacitor-background-fetch"
|
||||
:path: "../../../../node_modules/.pnpm/@transistorsoft+capacitor-background-fetch@8.0.0_@capacitor+core@8.2.0/node_modules/@transistorsoft/capacitor-background-fetch"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Capacitor: c95400d761e376be9da6be5a05f226c0e865cebf
|
||||
CapacitorApp: 30145f2ea2311e4f3744472119ec87d2ddf4c0a7
|
||||
CapacitorBrowser: 6c0e04dc80556a966ebc2269ac72f09d83eec1ce
|
||||
CapacitorClipboard: c1cb27fea166aab5c99bda605d3bc768cf00eabe
|
||||
CapacitorCommunityScreenBrightness: 95d4c839fc8e925dcf75ffee66f62a00f560f146
|
||||
CapacitorCordova: 8d93e14982f440181be7304aa9559ca631d77fff
|
||||
CapacitorDevice: 38ad323d74e3a86b56253680538ac23a2c9b4a68
|
||||
CapacitorDialog: bd99f63c9788a137263b2d75e718b1fc4d9f70c3
|
||||
CapacitorFilesystem: 9c2cc1e89d3b8b91503b316e9f6c2915c9bf9419
|
||||
CapacitorGeolocation: 86f82a32b238ff79d5be6fc0943f2866965d3f1b
|
||||
CapacitorHaptics: 0cea833e6a8bf489dd6acaaebf6d953b90086c59
|
||||
CapacitorKeyboard: f38d730356be5569d72eb87ad9c8166947728c36
|
||||
CapacitorLocalNotifications: d051c73ec8bf38807214f5b905ee6426e13756f8
|
||||
CapacitorNetwork: 7ff188197e880d8485f280492b54d3202e9f3a61
|
||||
CapacitorPreferences: 97d529423bb7c1196455e9a1b6dd1074625c78bd
|
||||
CapacitorScreenOrientation: f3a0744a56f673929d18bd0d9a5ef5f5595e7352
|
||||
CapacitorSecureStoragePlugin: 545b51d782d35e61a39231ecf99a966b060a2cbb
|
||||
CapacitorShare: ec1bcbc16696696133740ac876192c0480ca3018
|
||||
CapacitorSplashScreen: d2d8fe9541d7bebdf735839b89edf6e762cea969
|
||||
CordovaPlugins: b40548c03c597049ef851a7014da5ac8f155d914
|
||||
Capacitor: 49a454e1cdbd520bc106a220adca7913536a4933
|
||||
CapacitorApp: 942306cd1acf7774a00e89a3986af3a67c8cad7a
|
||||
CapacitorBrowser: 76847841b74c11ccac0a1afae18cf06e3bd59044
|
||||
CapacitorClipboard: c75fdaa6e622111119f35e7914ecfc67b05efecb
|
||||
CapacitorCommunityInAppReview: 4492bdd34aad4d27ed87949376022cc93b294ea1
|
||||
CapacitorCommunityScreenBrightness: e4075e1181f7e88259edb8b1e3b9a209e1144d45
|
||||
CapacitorCordova: a9ac88d84a1f5280f33b349fe50fce1902683ac0
|
||||
CapacitorDevice: ff033fa0c4ec19f5e059a073769a9b2347e69f57
|
||||
CapacitorDialog: 854c5dac405081cae697c177ca43bcaa95ae67bf
|
||||
CapacitorFilesystem: 2db285a1ac6e475cc27cae2e1bea999000f9e2be
|
||||
CapacitorGeolocation: 7132de914f9d853ec4642dc1d36e4e2018a4e8a8
|
||||
CapacitorHaptics: 4df2c625445cef39b67ea635a21802bc92df3b82
|
||||
CapacitorKeyboard: 867eb4b3c901d9bb5c3d0c93b546185d52484e19
|
||||
CapacitorLocalNotifications: 4db83a7f6bdd2f30dcedf5c6f92c415065467a24
|
||||
CapacitorNetwork: 8812ce60d11fb63d8f2e4ba51a49b2e59892ebe2
|
||||
CapacitorPreferences: cca2021f386efb75947c850334447d9ff22b14f1
|
||||
CapacitorScreenOrientation: 6c3c84223ea1dd44aaa7184e2b416dd1192270d0
|
||||
CapacitorSecureStoragePlugin: 50de0808ad398aa401e00f9e58adf88c77cb3c25
|
||||
CapacitorShare: 0c58305114538568059bfc07111f22dcb9cb2a82
|
||||
CapacitorSplashScreen: 4b46c72298db552b3c57ce021ef028b6dc7f1fa7
|
||||
CordovaPlugins: a59b2cf4431ebffa93e36e7cc3fc0aedfeb058ad
|
||||
IONFilesystemLib: 21a63377696b2d8fab5632ecfb7d2ac67bddb68a
|
||||
IONGeolocationLib: a5e40b54edc2ee9902036eda5aaa41ddf07bb68d
|
||||
SwiftKeychainWrapper: 807ba1d63c33a7d0613288512399cd1eda1e470c
|
||||
TransistorsoftCapacitorBackgroundFetch: dfa73a0fd038bc1986255360e4b20165a4a0f066
|
||||
TransistorsoftCapacitorBackgroundFetch: 12dc742682562c9339241d12615f27ef7dbfb88f
|
||||
TSBackgroundFetch: 0afbeaae4e1132866e1d4b6e55265af26b5958ae
|
||||
|
||||
PODFILE CHECKSUM: 601bc3c09529fe24d68110bc709379698476efe1
|
||||
PODFILE CHECKSUM: 809074712090e90da383be24c4ad182cd7a3dd1f
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
||||
+64
-65
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/app",
|
||||
"description": "The generic app tailored to fulfill needs of German universities, written using Ionic Framework.",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.3",
|
||||
"private": true,
|
||||
"license": "GPL-3.0-only",
|
||||
"author": "Karl-Philipp Wulfert <krlwlfrt@gmail.com>",
|
||||
@@ -20,7 +20,7 @@
|
||||
"changelog": "conventional-changelog -p angular -i src/assets/about/CHANGELOG.md -s -r 0",
|
||||
"check-icons": "node scripts/check-icon-correctness.mjs",
|
||||
"chromium:no-cors": "chromium --disable-web-security --user-data-dir=\".browser-data/chromium\"",
|
||||
"chromium:virtual-host": "chromium --host-resolver-rules=\"MAP mobile.app.uni-frankfurt.de:* localhost:8100\" --ignore-certificate-errors",
|
||||
"chromium:virtual-host": "chromium --host-resolver-rules=\"MAP dev.app.uni-frankfurt.de:* localhost:8100\" --ignore-certificate-errors --disable-web-security --user-data-dir=\".browser-data/chromium\"",
|
||||
"cypress:open": "cypress open",
|
||||
"cypress:run": "cypress run",
|
||||
"docker:build": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm install && npm run build\"",
|
||||
@@ -43,58 +43,57 @@
|
||||
"start": "ionic serve",
|
||||
"start:external": "ionic serve --external",
|
||||
"start:prod": "ionic serve --prod",
|
||||
"start:virtual-host": "ionic serve --public-host=mobile.app.uni-frankfurt.de --ssl=true --open=false",
|
||||
"start:virtual-host": "ionic serve --public-host=dev.app.uni-frankfurt.de --ssl=true --open=false",
|
||||
"test": "ng test --code-coverage",
|
||||
"test:integration": "sh integration-test.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "17.3.12",
|
||||
"@angular/cdk": "17.3.10",
|
||||
"@angular/common": "17.3.12",
|
||||
"@angular/core": "17.3.12",
|
||||
"@angular/forms": "17.3.12",
|
||||
"@angular/platform-browser": "17.3.12",
|
||||
"@angular/router": "17.3.12",
|
||||
"@awesome-cordova-plugins/calendar": "6.6.0",
|
||||
"@awesome-cordova-plugins/core": "6.6.0",
|
||||
"@capacitor-community/screen-brightness": "6.0.0",
|
||||
"@capacitor/app": "6.0.0",
|
||||
"@capacitor/browser": "6.0.1",
|
||||
"@capacitor/clipboard": "6.0.0",
|
||||
"@capacitor/core": "6.2.1",
|
||||
"@capacitor/device": "6.0.0",
|
||||
"@capacitor/dialog": "6.0.0",
|
||||
"@capacitor/filesystem": "6.0.0",
|
||||
"@capacitor/geolocation": "6.0.0",
|
||||
"@capacitor/haptics": "6.0.0",
|
||||
"@capacitor/keyboard": "6.0.1",
|
||||
"@capacitor/local-notifications": "6.0.0",
|
||||
"@capacitor/network": "6.0.1",
|
||||
"@capacitor/preferences": "6.0.1",
|
||||
"@capacitor/screen-orientation": "6.0.1",
|
||||
"@capacitor/share": "6.0.1",
|
||||
"@capacitor/splash-screen": "6.0.1",
|
||||
"@ionic-native/core": "5.36.0",
|
||||
"@ionic/angular": "8.6.1",
|
||||
"@ionic/angular-server": "8.6.1",
|
||||
"@angular/animations": "18.2.13",
|
||||
"@angular/cdk": "18.2.13",
|
||||
"@angular/common": "18.2.13",
|
||||
"@angular/core": "18.2.13",
|
||||
"@angular/forms": "18.2.13",
|
||||
"@angular/platform-browser": "18.2.13",
|
||||
"@angular/router": "18.2.13",
|
||||
"@awesome-cordova-plugins/calendar": "8.1.0",
|
||||
"@awesome-cordova-plugins/core": "8.1.0",
|
||||
"@capacitor-community/in-app-review": "8.0.0",
|
||||
"@capacitor-community/screen-brightness": "8.0.0",
|
||||
"@capacitor/app": "8.0.1",
|
||||
"@capacitor/browser": "8.0.2",
|
||||
"@capacitor/clipboard": "8.0.1",
|
||||
"@capacitor/core": "8.2.0",
|
||||
"@capacitor/device": "8.0.1",
|
||||
"@capacitor/dialog": "8.0.1",
|
||||
"@capacitor/filesystem": "8.1.2",
|
||||
"@capacitor/geolocation": "8.1.0",
|
||||
"@capacitor/haptics": "8.0.1",
|
||||
"@capacitor/keyboard": "8.0.1",
|
||||
"@capacitor/local-notifications": "8.0.2",
|
||||
"@capacitor/network": "8.0.1",
|
||||
"@capacitor/preferences": "8.0.1",
|
||||
"@capacitor/screen-orientation": "8.0.1",
|
||||
"@capacitor/share": "8.0.1",
|
||||
"@capacitor/splash-screen": "8.0.1",
|
||||
"@ionic/angular": "8.7.16",
|
||||
"@ionic/angular-server": "8.7.16",
|
||||
"@ionic/storage-angular": "4.0.0",
|
||||
"@maplibre/ngx-maplibre-gl": "17.4.1",
|
||||
"@ngx-translate/core": "15.0.0",
|
||||
"@ngx-translate/http-loader": "8.0.0",
|
||||
"@openid/appauth": "1.3.1",
|
||||
"@openid/appauth": "1.4.0",
|
||||
"@openstapps/api": "workspace:*",
|
||||
"@openstapps/collection-utils": "workspace:*",
|
||||
"@openstapps/core": "workspace:*",
|
||||
"@transistorsoft/capacitor-background-fetch": "6.0.0",
|
||||
"@transistorsoft/capacitor-background-fetch": "8.0.0",
|
||||
"@types/dom-view-transitions": "1.0.4",
|
||||
"capacitor-secure-storage-plugin": "0.10.0",
|
||||
"capacitor-secure-storage-plugin": "0.13.0",
|
||||
"cordova-plugin-calendar": "5.1.6",
|
||||
"date-fns": "3.6.0",
|
||||
"deepmerge": "4.3.1",
|
||||
"form-data": "4.0.0",
|
||||
"form-data": "4.0.4",
|
||||
"geojson": "0.5.0",
|
||||
"ionic-appauth": "0.9.0",
|
||||
"ionicons": "7.4.0",
|
||||
"ionicons": "8.0.13",
|
||||
"jsonpath-plus": "10.3.0",
|
||||
"maplibre-gl": "4.0.2",
|
||||
"material-symbols": "0.17.1",
|
||||
@@ -110,32 +109,32 @@
|
||||
"semver": "7.6.0",
|
||||
"swiper": "8.4.5",
|
||||
"tslib": "2.6.2",
|
||||
"zone.js": "0.14.4"
|
||||
"zone.js": "0.14.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/architect": "0.1703.17",
|
||||
"@angular-devkit/build-angular": "17.3.17",
|
||||
"@angular-devkit/core": "17.3.17",
|
||||
"@angular-devkit/schematics": "17.3.17",
|
||||
"@angular-eslint/builder": "17.5.3",
|
||||
"@angular-eslint/eslint-plugin": "17.5.3",
|
||||
"@angular-eslint/eslint-plugin-template": "17.5.3",
|
||||
"@angular-eslint/schematics": "17.5.3",
|
||||
"@angular-eslint/template-parser": "17.5.3",
|
||||
"@angular/cli": "17.3.17",
|
||||
"@angular/compiler": "17.3.12",
|
||||
"@angular/compiler-cli": "17.3.12",
|
||||
"@angular/language-server": "17.3.2",
|
||||
"@angular/language-service": "17.3.12",
|
||||
"@angular/platform-browser-dynamic": "17.3.12",
|
||||
"@capacitor/android": "6.2.1",
|
||||
"@capacitor/assets": "3.0.4",
|
||||
"@capacitor/cli": "6.2.1",
|
||||
"@capacitor/ios": "6.2.1",
|
||||
"@angular-devkit/architect": "0.1802.20",
|
||||
"@angular-devkit/build-angular": "18.2.20",
|
||||
"@angular-devkit/core": "18.2.20",
|
||||
"@angular-devkit/schematics": "18.2.20",
|
||||
"@angular-eslint/builder": "18.4.3",
|
||||
"@angular-eslint/eslint-plugin": "18.4.3",
|
||||
"@angular-eslint/eslint-plugin-template": "18.4.3",
|
||||
"@angular-eslint/schematics": "18.4.1",
|
||||
"@angular-eslint/template-parser": "18.4.3",
|
||||
"@angular/cli": "18.2.20",
|
||||
"@angular/compiler": "18.2.13",
|
||||
"@angular/compiler-cli": "18.2.13",
|
||||
"@angular/language-server": "18.2.0",
|
||||
"@angular/language-service": "18.2.13",
|
||||
"@angular/platform-browser-dynamic": "18.2.13",
|
||||
"@capacitor/android": "8.2.0",
|
||||
"@capacitor/assets": "3.0.5",
|
||||
"@capacitor/cli": "8.2.0",
|
||||
"@capacitor/ios": "8.2.0",
|
||||
"@compodoc/compodoc": "1.1.23",
|
||||
"@cypress/schematic": "3.0.0",
|
||||
"@ionic/angular-toolkit": "11.0.1",
|
||||
"@ionic/cli": "7.2.0",
|
||||
"@cypress/schematic": "4.1.1",
|
||||
"@ionic/angular-toolkit": "12.3.0",
|
||||
"@ionic/cli": "7.2.1",
|
||||
"@openstapps/prettier-config": "workspace:*",
|
||||
"@openstapps/tsconfig": "workspace:*",
|
||||
"@types/fontkit": "2.0.7",
|
||||
@@ -149,17 +148,17 @@
|
||||
"@types/karma-jasmine": "4.0.5",
|
||||
"@types/node": "22.15.31",
|
||||
"@types/semver": "7.5.8",
|
||||
"@typescript-eslint/eslint-plugin": "7.2.0",
|
||||
"@typescript-eslint/parser": "7.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "7.11.0",
|
||||
"@typescript-eslint/parser": "7.11.0",
|
||||
"cordova-res": "0.15.4",
|
||||
"cypress": "14.5.0",
|
||||
"cypress": "15.0.0",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-plugin-jsdoc": "48.2.1",
|
||||
"eslint-plugin-prettier": "5.1.3",
|
||||
"eslint-plugin-unicorn": "51.0.1",
|
||||
"fast-deep-equal": "3.1.3",
|
||||
"fontkit": "2.0.2",
|
||||
"glob": "10.3.10",
|
||||
"glob": "10.5.0",
|
||||
"http-server": "14.1.1",
|
||||
"is-docker": "2.2.1",
|
||||
"jasmine-core": "5.1.2",
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
// // src/app/_interceptors/fake-config.interceptor.ts
|
||||
// import { Injectable } from '@angular/core';
|
||||
// import {
|
||||
// HttpRequest,
|
||||
// HttpHandler,
|
||||
// HttpEvent,
|
||||
// HttpInterceptor,
|
||||
// HttpResponse
|
||||
// } from '@angular/common/http';
|
||||
// import { Observable, of } from 'rxjs';
|
||||
// import { delay } from 'rxjs/operators';
|
||||
//
|
||||
// @Injectable()
|
||||
// export class FakeConfigInterceptor implements HttpInterceptor {
|
||||
// intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||
// const targetUrl = 'https://mobile.server.uni-frankfur.de';
|
||||
//
|
||||
// const isTargetUrl = request.url === targetUrl;
|
||||
// const isPostMethod = request.method === 'POST';
|
||||
//
|
||||
// if (isTargetUrl && isPostMethod) {
|
||||
// const fakeConfig = {
|
||||
// appName: 'Uni Frankfurt Mobile',
|
||||
// version: '1.0.0-fake',
|
||||
// environment: 'development',
|
||||
// features: {
|
||||
// login: true,
|
||||
// offlineMode: true,
|
||||
// darkMode: false
|
||||
// },
|
||||
// message: 'Diese Konfiguration kommt vom FakeConfigInterceptor 🤖'
|
||||
// };
|
||||
//
|
||||
// return of(new HttpResponse({
|
||||
// status: 200,
|
||||
// body: fakeConfig
|
||||
// })).pipe(delay(300)); // Simuliere kurze Serververzögerung
|
||||
// }
|
||||
//
|
||||
// // Weiterleiten, wenn nicht exakt die Zielroute + POST
|
||||
// return next.handle(request);
|
||||
// }
|
||||
// }
|
||||
@@ -33,6 +33,7 @@ import {sampleAuthConfiguration} from './_helpers/data/sample-configuration';
|
||||
import {StorageProvider} from './modules/storage/storage.provider';
|
||||
import {SimpleBrowser} from './util/browser.factory';
|
||||
import {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
import {InAppReviewProvider} from './modules/settings/in-app-review/in-app-review.provider';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
let platformReadySpy: any;
|
||||
@@ -40,6 +41,7 @@ describe('AppComponent', () => {
|
||||
let translateServiceSpy: jasmine.SpyObj<TranslateService>;
|
||||
let thingTranslateServiceSpy: jasmine.SpyObj<ThingTranslateService>;
|
||||
let settingsProvider: jasmine.SpyObj<SettingsProvider>;
|
||||
let inAppReviewProvider: jasmine.SpyObj<InAppReviewProvider>;
|
||||
let configProvider: jasmine.SpyObj<ConfigProvider>;
|
||||
let ngxLogger: jasmine.SpyObj<NGXLogger>;
|
||||
let scheduleSyncServiceSpy: jasmine.SpyObj<ScheduleSyncService>;
|
||||
@@ -85,6 +87,7 @@ describe('AppComponent', () => {
|
||||
{provide: ThingTranslateService, useValue: thingTranslateServiceSpy},
|
||||
{provide: ScheduleSyncService, useValue: scheduleSyncServiceSpy},
|
||||
{provide: SettingsProvider, useValue: settingsProvider},
|
||||
{provide: InAppReviewProvider, useValue: inAppReviewProvider},
|
||||
{provide: ConfigProvider, useValue: configProvider},
|
||||
{provide: NGXLogger, useValue: ngxLogger},
|
||||
{provide: StorageProvider, useValue: storageProvider},
|
||||
|
||||
@@ -17,6 +17,7 @@ import {Router} from '@angular/router';
|
||||
import {App, URLOpenListenerEvent} from '@capacitor/app';
|
||||
import {Platform, ToastController} from '@ionic/angular/standalone';
|
||||
import {SettingsProvider} from './modules/settings/settings.provider';
|
||||
import {InAppReviewProvider} from './modules/settings/in-app-review/in-app-review.provider';
|
||||
import {AuthHelperService} from './modules/auth/auth-helper.service';
|
||||
import {environment} from '../environments/environment';
|
||||
import {Capacitor} from '@capacitor/core';
|
||||
@@ -24,6 +25,7 @@ import {ScheduleSyncService} from './modules/background/schedule/schedule-sync.s
|
||||
import {Keyboard, KeyboardResize} from '@capacitor/keyboard';
|
||||
import {AppVersionService} from './modules/about/app-version.service';
|
||||
import {SplashScreen} from '@capacitor/splash-screen';
|
||||
import {AuthService} from "./modules/auth/auth.service";
|
||||
|
||||
/**
|
||||
* TODO
|
||||
@@ -55,9 +57,11 @@ export class AppComponent implements AfterContentInit {
|
||||
constructor(
|
||||
private readonly platform: Platform,
|
||||
private readonly settingsProvider: SettingsProvider,
|
||||
private readonly inAppReviewProvider: InAppReviewProvider,
|
||||
private readonly router: Router,
|
||||
private readonly zone: NgZone,
|
||||
private readonly authHelper: AuthHelperService,
|
||||
private readonly authService: AuthService,
|
||||
private readonly toastController: ToastController,
|
||||
private readonly scheduleSyncService: ScheduleSyncService,
|
||||
private readonly versionService: AppVersionService,
|
||||
@@ -86,6 +90,8 @@ export class AppComponent implements AfterContentInit {
|
||||
async hideSplash() {
|
||||
if (Capacitor.isNativePlatform()) {
|
||||
void SplashScreen.hide();
|
||||
await this.inAppReviewProvider.increaseSessionCount();
|
||||
void this.inAppReviewProvider.startInAppReviewIfFeasible();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,12 +122,8 @@ export class AppComponent implements AfterContentInit {
|
||||
}
|
||||
|
||||
private async authNotificationsInit() {
|
||||
this.authHelper
|
||||
.getProvider('default')
|
||||
.events$.subscribe(action => this.showMessage(this.authHelper.getAuthMessage('default', action)));
|
||||
this.authHelper
|
||||
.getProvider('paia')
|
||||
.events$.subscribe(action => this.showMessage(this.authHelper.getAuthMessage('paia', action)));
|
||||
this.authService
|
||||
.events$.subscribe(action => this.showMessage(this.authHelper.getAuthMessage(action)));
|
||||
}
|
||||
|
||||
private async showMessage(message?: string) {
|
||||
|
||||
@@ -33,7 +33,6 @@ import {CatalogModule} from './modules/catalog/catalog.module';
|
||||
import {ConfigProvider} from './modules/config/config.provider';
|
||||
import {DashboardModule} from './modules/dashboard/dashboard.module';
|
||||
import {DataModule} from './modules/data/data.module';
|
||||
import {HebisModule} from './modules/hebis/hebis.module';
|
||||
import {MapModule} from './modules/map/map.module';
|
||||
import {MenuModule} from './modules/menu/menu.module';
|
||||
import {NewsModule} from './modules/news/news.module';
|
||||
@@ -53,14 +52,11 @@ import {FeedbackModule} from './modules/feedback/feedback.module';
|
||||
import {DebugDataCollectorService} from './modules/data/debug-data-collector.service';
|
||||
import {AuthModule} from './modules/auth/auth.module';
|
||||
import {BackgroundModule} from './modules/background/background.module';
|
||||
import {LibraryModule} from './modules/library/library.module';
|
||||
import {StorageProvider} from './modules/storage/storage.provider';
|
||||
import {AssessmentsModule} from './modules/assessments/assessments.module';
|
||||
import {ServiceHandlerInterceptor} from './_helpers/service-handler.interceptor';
|
||||
import {RoutingStackService} from './util/routing-stack.service';
|
||||
import {SCLanguageCode, SCSettingValue} from '@openstapps/core';
|
||||
import {DefaultAuthService} from './modules/auth/default-auth.service';
|
||||
import {PAIAAuthService} from './modules/auth/paia/paia-auth.service';
|
||||
import {NavigationModule} from './modules/menu/navigation/navigation.module';
|
||||
import {browserFactory, SimpleBrowser} from './util/browser.factory';
|
||||
import {getDateFnsLocale} from './translation/dfns-locale';
|
||||
@@ -70,6 +66,7 @@ import {Capacitor} from '@capacitor/core';
|
||||
import {SplashScreen} from '@capacitor/splash-screen';
|
||||
import maplibregl from 'maplibre-gl';
|
||||
import {Protocol} from 'pmtiles';
|
||||
import {AuthService} from "./modules/auth/auth.service";
|
||||
|
||||
registerLocaleData(localeDe);
|
||||
|
||||
@@ -85,8 +82,7 @@ export function initializerFactory(
|
||||
configProvider: ConfigProvider,
|
||||
translateService: TranslateService,
|
||||
_routingStackService: RoutingStackService,
|
||||
defaultAuthService: DefaultAuthService,
|
||||
paiaAuthService: PAIAAuthService,
|
||||
authService: AuthService,
|
||||
dateFnsConfigurationService: DateFnsConfigurationService,
|
||||
) {
|
||||
return async () => {
|
||||
@@ -114,8 +110,7 @@ export function initializerFactory(
|
||||
setDefaultOptions({locale: dateFnsLocale});
|
||||
dateFnsConfigurationService.setLocale(dateFnsLocale);
|
||||
|
||||
await defaultAuthService.init();
|
||||
await paiaAuthService.init();
|
||||
await authService.init();
|
||||
} catch (error) {
|
||||
logger.warn(error);
|
||||
}
|
||||
@@ -154,10 +149,8 @@ export function createTranslateLoader(http: HttpClient) {
|
||||
CommonModule,
|
||||
DashboardModule,
|
||||
DataModule,
|
||||
HebisModule,
|
||||
JobModule,
|
||||
FavoritesModule,
|
||||
LibraryModule,
|
||||
ProfilePageModule,
|
||||
FeedbackModule,
|
||||
MapModule,
|
||||
@@ -207,8 +200,7 @@ export function createTranslateLoader(http: HttpClient) {
|
||||
ConfigProvider,
|
||||
TranslateService,
|
||||
RoutingStackService,
|
||||
DefaultAuthService,
|
||||
PAIAAuthService,
|
||||
AuthService,
|
||||
DateFnsConfigurationService,
|
||||
],
|
||||
useFactory: initializerFactory,
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
import {SCAssessment, SCUuid} from '@openstapps/core';
|
||||
import {DefaultAuthService} from '../auth/default-auth.service';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {uniqBy, keyBy} from '@openstapps/collection-utils';
|
||||
import {AuthService} from "../auth/auth.service";
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -66,7 +66,7 @@ export class AssessmentsProvider {
|
||||
|
||||
constructor(
|
||||
readonly configProvider: ConfigProvider,
|
||||
readonly defaultAuth: DefaultAuthService,
|
||||
readonly authService: AuthService,
|
||||
readonly http: HttpClient,
|
||||
) {}
|
||||
|
||||
@@ -97,7 +97,7 @@ export class AssessmentsProvider {
|
||||
this.cache = this.http
|
||||
.get<{data: SCAssessment[]}>(`${url}/${this.assessmentPath}`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${accessToken ?? (await this.defaultAuth.getValidToken()).accessToken}`,
|
||||
Authorization: `Bearer ${accessToken ?? (await this.authService.getValidToken()).accessToken}`,
|
||||
},
|
||||
})
|
||||
.toPromise()
|
||||
|
||||
+42
-22
@@ -12,15 +12,17 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Component} from '@angular/core';
|
||||
import {NavController} from '@ionic/angular/standalone';
|
||||
import {Router} from '@angular/router';
|
||||
import {AuthActions, IAuthAction} from 'ionic-appauth';
|
||||
import {AuthHelperService} from '../../auth-helper.service';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
import {Observable} from 'rxjs';
|
||||
import {IPAIAAuthAction} from '../../paia/paia-auth-action';
|
||||
import {DefaultAuthService} from '../../default-auth.service';
|
||||
import {NavController} from '@ionic/angular/standalone';
|
||||
|
||||
import {
|
||||
AuthActions,
|
||||
AuthService,
|
||||
IAuthAction,
|
||||
} from '../../auth.service';
|
||||
import {AuthHelperService} from '../../auth-helper.service';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'auth-callback-page.component.html',
|
||||
@@ -28,25 +30,43 @@ import {DefaultAuthService} from '../../default-auth.service';
|
||||
})
|
||||
export class AuthCallbackPageComponent {
|
||||
constructor(
|
||||
private navCtrl: NavController,
|
||||
private router: Router,
|
||||
private authHelper: AuthHelperService,
|
||||
private auth: DefaultAuthService,
|
||||
private readonly navCtrl: NavController,
|
||||
private readonly authHelper: AuthHelperService,
|
||||
private readonly authService: AuthService,
|
||||
) {
|
||||
const events: Observable<IPAIAAuthAction | IAuthAction> = this.auth.events$;
|
||||
this.authService.events$
|
||||
.pipe(takeUntilDestroyed())
|
||||
.subscribe(action => {
|
||||
void this.postCallback(action);
|
||||
});
|
||||
|
||||
events.pipe(takeUntilDestroyed()).subscribe((action: IAuthAction) => this.postCallback(action));
|
||||
this.auth.authorizationCallback(window.location.origin + this.router.url);
|
||||
this.authService.authorizationCallback(
|
||||
window.location.href,
|
||||
);
|
||||
}
|
||||
|
||||
async postCallback(action: IAuthAction) {
|
||||
if (action.action === AuthActions.SignInSuccess) {
|
||||
const originPath = await this.authHelper.getOriginPath();
|
||||
this.navCtrl.navigateRoot(originPath ?? 'profile');
|
||||
this.authHelper.deleteOriginPath();
|
||||
}
|
||||
if (action.action === AuthActions.SignInFailed) {
|
||||
this.navCtrl.navigateRoot('profile');
|
||||
private async postCallback(
|
||||
action: IAuthAction,
|
||||
): Promise<void> {
|
||||
switch (action.action) {
|
||||
case AuthActions.SignInSuccess: {
|
||||
const originPath =
|
||||
await this.authHelper.getOriginPath();
|
||||
|
||||
await this.authHelper.deleteOriginPath();
|
||||
|
||||
await this.navCtrl.navigateRoot(
|
||||
originPath ?? 'profile',
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case AuthActions.SignInFailed: {
|
||||
await this.navCtrl.navigateRoot('profile');
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import {Injectable} from '@angular/core';
|
||||
import {CanActivate, NavigationExtras, Router, RouterStateSnapshot} from '@angular/router';
|
||||
import {ActivatedProtectedRouteSnapshot} from './protected.routes';
|
||||
import {AuthHelperService} from './auth-helper.service';
|
||||
import {AuthService} from "./auth.service";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@@ -24,6 +25,7 @@ import {AuthHelperService} from './auth-helper.service';
|
||||
export class AuthGuardService implements CanActivate {
|
||||
constructor(
|
||||
private authHelper: AuthHelperService,
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
) {}
|
||||
|
||||
@@ -33,7 +35,7 @@ export class AuthGuardService implements CanActivate {
|
||||
}
|
||||
|
||||
try {
|
||||
await this.authHelper.getProvider(route.data.authProvider).getValidToken();
|
||||
await this.authService.getValidToken();
|
||||
} catch {
|
||||
const originNavigation = this.router.getCurrentNavigation();
|
||||
let extras: NavigationExtras = {};
|
||||
@@ -42,7 +44,7 @@ export class AuthGuardService implements CanActivate {
|
||||
extras = {queryParams: {origin_path: url}};
|
||||
}
|
||||
this.router.navigate(['profile'], extras);
|
||||
await this.authHelper.getProvider(route.data.authProvider).signIn();
|
||||
await this.authService.signIn();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import {AuthHelperService} from './auth-helper.service';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
import {StorageProvider} from '../storage/storage.provider';
|
||||
import {DefaultAuthService} from './default-auth.service';
|
||||
import {Browser} from 'ionic-appauth';
|
||||
import {Requestor, StorageBackend} from '@openid/appauth';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {PAIAAuthService} from './paia/paia-auth.service';
|
||||
import {StAppsWebHttpClient} from '../data/stapps-web-http-client.provider';
|
||||
import {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
import {SimpleBrowser} from '../../util/browser.factory';
|
||||
import {LoggerTestingModule} from 'ngx-logger/testing';
|
||||
|
||||
describe('AuthHelperService', () => {
|
||||
let authHelperService: AuthHelperService;
|
||||
const storageProviderSpy = jasmine.createSpyObj('StorageProvider', ['init', 'get', 'has', 'put', 'search']);
|
||||
const translateServiceSpy = jasmine.createSpyObj('TranslateService', ['setDefaultLang', 'use']);
|
||||
const defaultAuthServiceMock = jasmine.createSpyObj('DefaultAuthService', ['init', 'setupConfiguration']);
|
||||
const paiaAuthServiceMock = jasmine.createSpyObj('PAIAAuthService', ['init', 'setupConfiguration']);
|
||||
const authHelperServiceMock = jasmine.createSpyObj('AuthHelperService', ['constructor']);
|
||||
const simpleBrowserMock = jasmine.createSpyObj('SimpleBrowser', ['open']);
|
||||
const configProvider = jasmine.createSpyObj('ConfigProvider', {
|
||||
getAnyValue: {
|
||||
default: {
|
||||
endpoints: {
|
||||
mapping: {
|
||||
id: '$.id',
|
||||
email: '$.attributes.mailPrimaryAddress',
|
||||
givenName: '$.attributes.givenName',
|
||||
familyName: '$.attributes.sn',
|
||||
name: '$.attributes.sn',
|
||||
role: '$.attributes.eduPersonPrimaryAffiliation',
|
||||
studentId: '$.attributes.employeeNumber',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [LoggerTestingModule],
|
||||
providers: [
|
||||
StAppsWebHttpClient,
|
||||
{
|
||||
provide: TranslateService,
|
||||
useValue: translateServiceSpy,
|
||||
},
|
||||
{
|
||||
provide: StorageProvider,
|
||||
useValue: storageProviderSpy,
|
||||
},
|
||||
{
|
||||
provider: DefaultAuthService,
|
||||
useValue: defaultAuthServiceMock,
|
||||
},
|
||||
{
|
||||
provider: PAIAAuthService,
|
||||
useValue: paiaAuthServiceMock,
|
||||
},
|
||||
{
|
||||
provide: ConfigProvider,
|
||||
useValue: configProvider,
|
||||
},
|
||||
Browser,
|
||||
StorageBackend,
|
||||
Requestor,
|
||||
{
|
||||
provider: AuthHelperService,
|
||||
useValue: authHelperServiceMock,
|
||||
},
|
||||
{
|
||||
provide: SimpleBrowser,
|
||||
useValue: simpleBrowserMock,
|
||||
},
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
],
|
||||
});
|
||||
authHelperService = TestBed.inject(AuthHelperService);
|
||||
});
|
||||
|
||||
describe('getUserFromUserInfo', () => {
|
||||
it('should provide user configuration from userInfo', async () => {
|
||||
const userConfiguration = authHelperService.getUserFromUserInfo({
|
||||
attributes: {
|
||||
eduPersonPrimaryAffiliation: 'student',
|
||||
employeeNumber: '123456',
|
||||
givenName: 'Erika',
|
||||
mailPrimaryAddress: 'emuster@anyschool.de',
|
||||
oauthClientId: '123-abc-123',
|
||||
sn: 'Musterfrau',
|
||||
uid: 'emuster',
|
||||
},
|
||||
id: 'emuster',
|
||||
client_id: '123-abc-123',
|
||||
});
|
||||
|
||||
expect(userConfiguration).toEqual({
|
||||
id: 'emuster',
|
||||
givenName: 'Erika',
|
||||
familyName: 'Musterfrau',
|
||||
name: 'Erika Musterfrau',
|
||||
email: 'emuster@anyschool.de',
|
||||
role: 'student',
|
||||
studentId: '123456',
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -14,39 +14,40 @@
|
||||
*/
|
||||
|
||||
import {Injectable} from '@angular/core';
|
||||
import {IPAIAAuthAction} from './paia/paia-auth-action';
|
||||
import {AuthActions, IAuthAction} from 'ionic-appauth';
|
||||
import {AlertController} from '@ionic/angular/standalone';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {JSONPath} from 'jsonpath-plus';
|
||||
import {
|
||||
SCAuthorizationProvider,
|
||||
SCAuthorizationProviderType,
|
||||
SCUserConfiguration,
|
||||
SCUserConfigurationMap,
|
||||
} from '@openstapps/core';
|
||||
import {JSONPath} from 'jsonpath-plus';
|
||||
|
||||
import {SimpleBrowser} from '../../util/browser.factory';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
import {StorageProvider} from '../storage/storage.provider';
|
||||
import {DefaultAuthService} from './default-auth.service';
|
||||
import {PAIAAuthService} from './paia/paia-auth.service';
|
||||
import {SimpleBrowser} from '../../util/browser.factory';
|
||||
import {AlertController} from '@ionic/angular/standalone';
|
||||
import {
|
||||
AuthActions,
|
||||
AuthService,
|
||||
IAuthAction,
|
||||
} from './auth.service';
|
||||
|
||||
const AUTH_ORIGIN_PATH = 'stapps.auth.origin_path';
|
||||
const AUTH_MESSAGE_PREFIX = 'auth.messages.default';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AuthHelperService {
|
||||
userConfigurationMap: SCUserConfigurationMap;
|
||||
readonly userConfigurationMap: SCUserConfigurationMap;
|
||||
|
||||
constructor(
|
||||
private translateService: TranslateService,
|
||||
private configProvider: ConfigProvider,
|
||||
private storageProvider: StorageProvider,
|
||||
private defaultAuth: DefaultAuthService,
|
||||
private paiaAuth: PAIAAuthService,
|
||||
private browser: SimpleBrowser,
|
||||
private alertController: AlertController,
|
||||
private readonly translateService: TranslateService,
|
||||
private readonly configProvider: ConfigProvider,
|
||||
private readonly storageProvider: StorageProvider,
|
||||
private readonly authService: AuthService,
|
||||
private readonly browser: SimpleBrowser,
|
||||
private readonly alertController: AlertController,
|
||||
) {
|
||||
this.userConfigurationMap =
|
||||
(
|
||||
@@ -56,98 +57,139 @@ export class AuthHelperService {
|
||||
).default?.endpoints.mapping ?? {};
|
||||
}
|
||||
|
||||
public getAuthMessage(provider: SCAuthorizationProviderType, action: IAuthAction | IPAIAAuthAction) {
|
||||
let message: string | undefined;
|
||||
public getAuthMessage(
|
||||
action: IAuthAction,
|
||||
): string | undefined {
|
||||
switch (action.action) {
|
||||
case AuthActions.SignInSuccess: {
|
||||
message = this.translateService.instant(`auth.messages.${provider}.logged_in_success`);
|
||||
break;
|
||||
}
|
||||
case AuthActions.SignOutSuccess: {
|
||||
message = this.translateService.instant(`auth.messages.${provider}.logged_out_success`);
|
||||
break;
|
||||
}
|
||||
case AuthActions.SignInSuccess:
|
||||
return this.translateService.instant(
|
||||
`${AUTH_MESSAGE_PREFIX}.logged_in_success`,
|
||||
);
|
||||
|
||||
case AuthActions.SignOutSuccess:
|
||||
return this.translateService.instant(
|
||||
`${AUTH_MESSAGE_PREFIX}.logged_out_success`,
|
||||
);
|
||||
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
getUserFromUserInfo(userInfo: object) {
|
||||
public getUserFromUserInfo(
|
||||
userInfo: object,
|
||||
): SCUserConfiguration {
|
||||
const user: SCUserConfiguration = {
|
||||
id: '',
|
||||
name: '',
|
||||
role: 'student',
|
||||
};
|
||||
|
||||
for (const key in this.userConfigurationMap) {
|
||||
user[key as keyof SCUserConfiguration] = JSONPath({
|
||||
path: this.userConfigurationMap[key as keyof SCUserConfiguration] as string,
|
||||
const userKey =
|
||||
key as keyof SCUserConfiguration;
|
||||
|
||||
user[userKey] = JSONPath({
|
||||
path:
|
||||
this.userConfigurationMap[
|
||||
userKey
|
||||
] as string,
|
||||
json: userInfo,
|
||||
})[0];
|
||||
}
|
||||
if (user.givenName && user.givenName.length > 0 && user.familyName && user.familyName.length > 0) {
|
||||
user.name = `${user.givenName} ${user.familyName}`;
|
||||
|
||||
if (
|
||||
user.givenName &&
|
||||
user.familyName
|
||||
) {
|
||||
user.name =
|
||||
`${user.givenName} ${user.familyName}`;
|
||||
}
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
async deleteOriginPath() {
|
||||
return this.storageProvider.delete(AUTH_ORIGIN_PATH);
|
||||
public async deleteOriginPath():
|
||||
Promise<void> {
|
||||
await this.storageProvider.delete(
|
||||
AUTH_ORIGIN_PATH,
|
||||
);
|
||||
}
|
||||
|
||||
async setOriginPath(path: string) {
|
||||
return this.storageProvider.put<string>(AUTH_ORIGIN_PATH, path);
|
||||
public async setOriginPath(
|
||||
path: string,
|
||||
): Promise<void> {
|
||||
await this.storageProvider.put(
|
||||
AUTH_ORIGIN_PATH,
|
||||
path,
|
||||
);
|
||||
}
|
||||
|
||||
async getOriginPath() {
|
||||
let originPath: string;
|
||||
public async getOriginPath():
|
||||
Promise<string | undefined> {
|
||||
try {
|
||||
originPath = await this.storageProvider.get<string>(AUTH_ORIGIN_PATH);
|
||||
return await this.storageProvider.get<string>(
|
||||
AUTH_ORIGIN_PATH,
|
||||
);
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
public async endBrowserSession():
|
||||
Promise<void> {
|
||||
const endSessionEndpoint =
|
||||
await this.authService
|
||||
.getEndSessionEndpoint();
|
||||
|
||||
if (!endSessionEndpoint) {
|
||||
return;
|
||||
}
|
||||
return originPath;
|
||||
}
|
||||
|
||||
getProvider<B extends SCAuthorizationProviderType>(
|
||||
providerType: B,
|
||||
): B extends 'paia' ? PAIAAuthService : DefaultAuthService;
|
||||
/**
|
||||
* Provides appropriate auth service instance based on type (string) parameter
|
||||
*/
|
||||
getProvider(providerType: SCAuthorizationProviderType): DefaultAuthService | PAIAAuthService {
|
||||
return providerType === 'paia'
|
||||
? (this.paiaAuth as PAIAAuthService)
|
||||
: (this.defaultAuth as DefaultAuthService);
|
||||
}
|
||||
const alert =
|
||||
await this.alertController.create({
|
||||
header:
|
||||
this.translateService.instant(
|
||||
`${AUTH_MESSAGE_PREFIX}.log_out_alert.header`,
|
||||
),
|
||||
|
||||
/**
|
||||
* Ends browser session by opening endSessionEndpoint URL of the provider
|
||||
* @param providerType Type of the provider (e.g. 'default' or 'paia')
|
||||
*/
|
||||
async endBrowserSession(providerType: SCAuthorizationProviderType) {
|
||||
const endSessionEndpoint = (await this.getProvider(providerType).configuration).endSessionEndpoint;
|
||||
message:
|
||||
this.translateService.instant(
|
||||
`${AUTH_MESSAGE_PREFIX}.log_out_alert.message`,
|
||||
),
|
||||
|
||||
if (endSessionEndpoint) {
|
||||
const alert: HTMLIonAlertElement = await this.alertController.create({
|
||||
header: this.translateService.instant(`auth.messages.${providerType}.log_out_alert.header`),
|
||||
message: this.translateService.instant(`auth.messages.${providerType}.log_out_alert.message`),
|
||||
buttons: [
|
||||
{
|
||||
text: this.translateService.instant('no'),
|
||||
text:
|
||||
this.translateService.instant(
|
||||
'no',
|
||||
),
|
||||
|
||||
role: 'cancel',
|
||||
cssClass: 'default',
|
||||
},
|
||||
{
|
||||
text: this.translateService.instant('yes'),
|
||||
text:
|
||||
this.translateService.instant(
|
||||
'yes',
|
||||
),
|
||||
|
||||
role: 'confirm',
|
||||
cssClass: 'preferred',
|
||||
handler: () => {
|
||||
this.browser.open(new URL(endSessionEndpoint).href);
|
||||
|
||||
handler: async () => {
|
||||
/*
|
||||
* Only now, after explicit confirmation,
|
||||
* open the IdP end-session endpoint.
|
||||
*/
|
||||
await this.browser.open(
|
||||
endSessionEndpoint,
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await alert.present();
|
||||
}
|
||||
await alert.present();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,15 +12,5 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {SCAuthorizationProviderType} from '@openstapps/core';
|
||||
|
||||
export const authPaths: {
|
||||
[key in SCAuthorizationProviderType]: {redirect_path: string};
|
||||
} = {
|
||||
default: {
|
||||
redirect_path: 'auth/callback',
|
||||
},
|
||||
paia: {
|
||||
redirect_path: 'auth/paia/callback',
|
||||
},
|
||||
};
|
||||
export const AUTH_REDIRECT_PATH = 'auth/callback';
|
||||
|
||||
@@ -15,21 +15,14 @@
|
||||
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {authPaths} from './auth-paths';
|
||||
import {AUTH_REDIRECT_PATH} from './auth-paths';
|
||||
import {AuthCallbackPageComponent} from './auth-callback/page/auth-callback-page.component';
|
||||
import {DefaultAuthService} from './default-auth.service';
|
||||
import {PAIAAuthService} from './paia/paia-auth.service';
|
||||
|
||||
const authRoutes: Routes = [
|
||||
{
|
||||
path: authPaths.default.redirect_path,
|
||||
path: AUTH_REDIRECT_PATH,
|
||||
component: AuthCallbackPageComponent,
|
||||
},
|
||||
{
|
||||
path: authPaths.paia.redirect_path,
|
||||
component: AuthCallbackPageComponent,
|
||||
providers: [{provide: DefaultAuthService, useExisting: PAIAAuthService}],
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,15 +3,12 @@ import {CommonModule} from '@angular/common';
|
||||
import {Platform} from '@ionic/angular/standalone';
|
||||
import {Requestor, StorageBackend} from '@openid/appauth';
|
||||
import {storageFactory} from './factories';
|
||||
import {Browser} from 'ionic-appauth';
|
||||
import {CapacitorBrowser} from 'ionic-appauth/lib/capacitor';
|
||||
import {httpFactory} from './factories/http.factory';
|
||||
import {requestorFactory} from './factories/requestor.factory';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {AuthRoutingModule} from './auth-routing.module';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {AuthCallbackPageComponent} from './auth-callback/page/auth-callback-page.component';
|
||||
import {DefaultAuthService} from './default-auth.service';
|
||||
import {PAIAAuthService} from './paia/paia-auth.service';
|
||||
import {AuthService} from "./auth.service";
|
||||
|
||||
@NgModule({
|
||||
declarations: [AuthCallbackPageComponent],
|
||||
@@ -24,15 +21,10 @@ import {PAIAAuthService} from './paia/paia-auth.service';
|
||||
},
|
||||
{
|
||||
provide: Requestor,
|
||||
useFactory: httpFactory,
|
||||
useFactory: requestorFactory,
|
||||
deps: [Platform, HttpClient],
|
||||
},
|
||||
{
|
||||
provide: Browser,
|
||||
useClass: CapacitorBrowser,
|
||||
},
|
||||
DefaultAuthService,
|
||||
PAIAAuthService,
|
||||
AuthService,
|
||||
],
|
||||
})
|
||||
export class AuthModule {}
|
||||
|
||||
@@ -13,69 +13,90 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {AuthorizationServiceConfigurationJson} from '@openid/appauth';
|
||||
import {IAuthConfig} from 'ionic-appauth';
|
||||
import {SCAuthorizationProvider, SCAuthorizationProviderType} from '@openstapps/core';
|
||||
import {Capacitor} from '@capacitor/core';
|
||||
import {authPaths} from './auth-paths';
|
||||
import {SCAuthorizationProvider} from '@openstapps/core';
|
||||
import {
|
||||
AuthorizationServiceConfiguration,
|
||||
} from '@openid/appauth';
|
||||
|
||||
import {environment} from '../../../environments/environment';
|
||||
import {AUTH_REDIRECT_PATH} from './auth-paths';
|
||||
import type {AuthConfig} from './auth.service';
|
||||
|
||||
export interface OidcEndpoints {
|
||||
userinfo?: string;
|
||||
endSession?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get configuration of an OAuth2 client
|
||||
* Returns the configuration of the OIDC client.
|
||||
*/
|
||||
export function getClientConfig(
|
||||
providerType: SCAuthorizationProviderType,
|
||||
authConfig: {
|
||||
default?: SCAuthorizationProvider;
|
||||
paia?: SCAuthorizationProvider;
|
||||
default: SCAuthorizationProvider;
|
||||
},
|
||||
): IAuthConfig {
|
||||
const providerConfig = authConfig[providerType] as SCAuthorizationProvider;
|
||||
): AuthConfig {
|
||||
const provider =
|
||||
authConfig.default;
|
||||
|
||||
return {
|
||||
end_session_redirect_url: '',
|
||||
server_host: provider.client.url,
|
||||
client_id: provider.client.clientId,
|
||||
scopes: provider.client.scopes,
|
||||
redirect_url: getRedirectUrl(),
|
||||
pkce: true,
|
||||
scopes: providerConfig.client.scopes,
|
||||
server_host: providerConfig.client.url,
|
||||
client_id: providerConfig.client.clientId,
|
||||
redirect_url: getRedirectUrl(authPaths[providerType].redirect_path),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get configuration about endpoints of an OAuth2 server
|
||||
* Returns the AppAuth OAuth/OIDC service configuration.
|
||||
*/
|
||||
export function getEndpointsConfig(
|
||||
providerType: SCAuthorizationProviderType,
|
||||
export function getServiceConfiguration(
|
||||
authConfig: {
|
||||
default?: SCAuthorizationProvider;
|
||||
paia?: SCAuthorizationProvider;
|
||||
default: SCAuthorizationProvider;
|
||||
},
|
||||
): AuthorizationServiceConfigurationJson {
|
||||
const providerConfig = authConfig[providerType] as SCAuthorizationProvider;
|
||||
): AuthorizationServiceConfiguration {
|
||||
const endpoints =
|
||||
authConfig.default.endpoints;
|
||||
|
||||
return new AuthorizationServiceConfiguration({
|
||||
authorization_endpoint: endpoints.authorization,
|
||||
token_endpoint: endpoints.token,
|
||||
revocation_endpoint: endpoints.revoke || '',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the additional OIDC endpoints that AppAuth-JS does not expose
|
||||
* through AuthorizationServiceConfiguration.
|
||||
*/
|
||||
export function getOidcEndpoints(
|
||||
authConfig: {
|
||||
default: SCAuthorizationProvider;
|
||||
},
|
||||
): OidcEndpoints {
|
||||
const endpoints = authConfig.default.endpoints;
|
||||
|
||||
return {
|
||||
authorization_endpoint: providerConfig.endpoints.authorization,
|
||||
end_session_endpoint: providerConfig.endpoints.endSession,
|
||||
revocation_endpoint: providerConfig.endpoints.revoke ?? '',
|
||||
token_endpoint: providerConfig.endpoints.token,
|
||||
userinfo_endpoint: providerConfig.endpoints.userinfo,
|
||||
userinfo:
|
||||
endpoints.userinfo,
|
||||
|
||||
endSession:
|
||||
endpoints.endSession,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a URL of the app, depending on the platform where it is running
|
||||
* Returns the OIDC redirect URL depending on the current platform.
|
||||
*/
|
||||
function getRedirectUrl(routePath: string): string {
|
||||
let appHost: string;
|
||||
let appSchema: string;
|
||||
if (environment.production) {
|
||||
appSchema = Capacitor.isNativePlatform() ? environment.custom_url_scheme : 'https';
|
||||
appHost = environment.app_host;
|
||||
} else {
|
||||
appSchema = Capacitor.isNativePlatform()
|
||||
? environment.custom_url_scheme
|
||||
: window.location.protocol.split(':')[0];
|
||||
|
||||
appHost = Capacitor.isNativePlatform() ? environment.app_host : window.location.host;
|
||||
function getRedirectUrl(): string {
|
||||
if (Capacitor.isNativePlatform()) {
|
||||
return `${environment.custom_url_scheme}://${environment.app_host}/${AUTH_REDIRECT_PATH}`;
|
||||
}
|
||||
return `${appSchema}://${appHost}/${routePath}`;
|
||||
|
||||
if (environment.production) {
|
||||
return `https://${environment.app_host}/${AUTH_REDIRECT_PATH}`;
|
||||
}
|
||||
|
||||
return `${window.location.origin}/${AUTH_REDIRECT_PATH}`;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,270 @@
|
||||
/*
|
||||
* Copyright (C) 2026 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Browser} from '@capacitor/browser';
|
||||
import {
|
||||
AuthorizationError,
|
||||
AuthorizationErrorJson,
|
||||
AuthorizationRequest,
|
||||
AuthorizationRequestHandler,
|
||||
AuthorizationRequestJson,
|
||||
AuthorizationRequestResponse,
|
||||
AuthorizationResponse,
|
||||
AuthorizationResponseJson,
|
||||
AuthorizationServiceConfiguration,
|
||||
BasicQueryStringUtils,
|
||||
DefaultCrypto,
|
||||
StorageBackend,
|
||||
StringMap,
|
||||
} from '@openid/appauth';
|
||||
|
||||
const AUTHORIZATION_REQUEST_KEY =
|
||||
'appauth_capacitor_authorization_request';
|
||||
|
||||
/**
|
||||
* AppAuth authorization request handler for native Capacitor applications.
|
||||
*
|
||||
* AppAuth-JS handles:
|
||||
* - state generation and validation data
|
||||
* - PKCE code_verifier / code_challenge
|
||||
* - authorization URL construction
|
||||
* - AuthorizationNotifier
|
||||
*
|
||||
* This handler adds the Capacitor-specific parts:
|
||||
* - persist the pending authorization request
|
||||
* - open the authorization URL using @capacitor/browser
|
||||
* - process the callback URL delivered through appUrlOpen
|
||||
*/
|
||||
export class CapacitorAuthorizationRequestHandler extends AuthorizationRequestHandler {
|
||||
private callbackUrl?: string;
|
||||
|
||||
constructor(private readonly storage: StorageBackend) {
|
||||
super(
|
||||
new BasicQueryStringUtils(),
|
||||
new DefaultCrypto(),
|
||||
);
|
||||
}
|
||||
|
||||
public async performAuthorizationRequest(
|
||||
configuration: AuthorizationServiceConfiguration,
|
||||
request: AuthorizationRequest,
|
||||
): Promise<void> {
|
||||
/*
|
||||
* Important:
|
||||
*
|
||||
* toJson() calls setupCodeVerifier() internally.
|
||||
* Therefore PKCE is initialized before buildRequestUrl()
|
||||
* constructs the authorization URL.
|
||||
*/
|
||||
const requestJson =
|
||||
await request.toJson();
|
||||
|
||||
await this.storage.setItem(
|
||||
AUTHORIZATION_REQUEST_KEY,
|
||||
JSON.stringify(requestJson),
|
||||
);
|
||||
|
||||
const url =
|
||||
this.buildRequestUrl(
|
||||
configuration,
|
||||
request,
|
||||
);
|
||||
|
||||
await Browser.open({url});
|
||||
}
|
||||
|
||||
/**
|
||||
* Completes the authorization flow using the URL received from
|
||||
* Capacitor's App.addListener('appUrlOpen', ...).
|
||||
*/
|
||||
public async completeAuthorizationRequestFromUrl(
|
||||
callbackUrl: string,
|
||||
): Promise<void> {
|
||||
this.callbackUrl = callbackUrl;
|
||||
|
||||
/*
|
||||
* The deep link has returned control to the application.
|
||||
* Close the SFSafariViewController / Custom Tab if it is still open.
|
||||
*/
|
||||
try {
|
||||
await Browser.close();
|
||||
} catch {
|
||||
// Browser might already have been closed by the platform.
|
||||
}
|
||||
|
||||
await this.completeAuthorizationRequestIfPossible();
|
||||
}
|
||||
|
||||
protected async completeAuthorizationRequest():
|
||||
Promise<AuthorizationRequestResponse | null> {
|
||||
if (!this.callbackUrl) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const storedRequest =
|
||||
await this.storage.getItem(
|
||||
AUTHORIZATION_REQUEST_KEY,
|
||||
);
|
||||
|
||||
if (!storedRequest) {
|
||||
this.callbackUrl = undefined;
|
||||
|
||||
throw new Error(
|
||||
'No pending authorization request found.',
|
||||
);
|
||||
}
|
||||
|
||||
const requestJson =
|
||||
JSON.parse(
|
||||
storedRequest,
|
||||
) as AuthorizationRequestJson;
|
||||
|
||||
/*
|
||||
* The serialized request also contains `internal`, including
|
||||
* AppAuth's PKCE code_verifier.
|
||||
*/
|
||||
const request =
|
||||
new AuthorizationRequest(requestJson);
|
||||
|
||||
const parameters =
|
||||
this.parseCallbackUrl(
|
||||
this.callbackUrl,
|
||||
);
|
||||
|
||||
const state =
|
||||
parameters['state'];
|
||||
|
||||
/*
|
||||
* Never accept an authorization response for a different request.
|
||||
*/
|
||||
if (!state || state !== request.state) {
|
||||
this.callbackUrl = undefined;
|
||||
|
||||
throw new Error(
|
||||
'Authorization response state does not match the authorization request.',
|
||||
);
|
||||
}
|
||||
|
||||
const error =
|
||||
parameters['error'];
|
||||
|
||||
let response:
|
||||
AuthorizationResponse | null = null;
|
||||
|
||||
let authorizationError:
|
||||
AuthorizationError | null = null;
|
||||
|
||||
if (error) {
|
||||
const errorJson:
|
||||
AuthorizationErrorJson = {
|
||||
error,
|
||||
|
||||
error_description:
|
||||
parameters[
|
||||
'error_description'
|
||||
],
|
||||
|
||||
error_uri:
|
||||
parameters['error_uri'],
|
||||
|
||||
state,
|
||||
};
|
||||
|
||||
authorizationError =
|
||||
new AuthorizationError(
|
||||
errorJson,
|
||||
);
|
||||
} else {
|
||||
const code =
|
||||
parameters['code'];
|
||||
|
||||
if (!code) {
|
||||
this.callbackUrl = undefined;
|
||||
|
||||
throw new Error(
|
||||
'Authorization callback contains neither an authorization code nor an error.',
|
||||
);
|
||||
}
|
||||
|
||||
const responseJson:
|
||||
AuthorizationResponseJson = {
|
||||
code,
|
||||
state,
|
||||
};
|
||||
|
||||
response =
|
||||
new AuthorizationResponse(
|
||||
responseJson,
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* The response has been successfully associated with the
|
||||
* pending request. It can now be consumed exactly once.
|
||||
*/
|
||||
await this.storage.removeItem(
|
||||
AUTHORIZATION_REQUEST_KEY,
|
||||
);
|
||||
|
||||
this.callbackUrl = undefined;
|
||||
|
||||
return {
|
||||
request,
|
||||
response,
|
||||
error: authorizationError,
|
||||
};
|
||||
}
|
||||
|
||||
private parseCallbackUrl(
|
||||
callbackUrl: string,
|
||||
): StringMap {
|
||||
const result: StringMap = {};
|
||||
|
||||
const url = new URL(callbackUrl);
|
||||
|
||||
/*
|
||||
* Authorization Code Flow normally returns code/state in
|
||||
* the query string:
|
||||
*
|
||||
* openstapps:/callback?code=...&state=...
|
||||
*/
|
||||
url.searchParams.forEach(
|
||||
(value, key) => {
|
||||
result[key] = value;
|
||||
},
|
||||
);
|
||||
|
||||
/*
|
||||
* Also accept parameters in the fragment as a fallback.
|
||||
*/
|
||||
if (url.hash.length > 1) {
|
||||
const hash =
|
||||
url.hash.substring(1);
|
||||
|
||||
const hashParameters =
|
||||
new URLSearchParams(hash);
|
||||
|
||||
hashParameters.forEach(
|
||||
(value, key) => {
|
||||
if (!(key in result)) {
|
||||
result[key] = value;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -13,61 +13,77 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Requestor} from '@openid/appauth';
|
||||
import {CapacitorHttp, HttpHeaders, HttpResponse} from '@capacitor/core';
|
||||
import {XhrSettings} from 'ionic-appauth/lib/cordova';
|
||||
import {
|
||||
AppAuthError,
|
||||
Requestor,
|
||||
} from '@openid/appauth';
|
||||
import {
|
||||
CapacitorHttp,
|
||||
HttpHeaders,
|
||||
HttpOptions,
|
||||
} from '@capacitor/core';
|
||||
|
||||
// REQUIRES CAPACITOR PLUGIN
|
||||
// @capacitor-community/http
|
||||
export class CapacitorRequestor extends Requestor {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
type XhrSettings = Parameters<Requestor['xhr']>[0];
|
||||
|
||||
export class CapacitorRequestor implements Requestor {
|
||||
public async xhr<T>(settings: XhrSettings): Promise<T> {
|
||||
if (!settings.method) settings.method = 'GET';
|
||||
if (!settings.url) {
|
||||
throw new AppAuthError('A URL must be provided.');
|
||||
}
|
||||
|
||||
switch (settings.method) {
|
||||
case 'GET': {
|
||||
return this.get(settings.url, settings.headers);
|
||||
}
|
||||
case 'POST': {
|
||||
return this.post(settings.url, settings.data, settings.headers);
|
||||
}
|
||||
case 'PUT': {
|
||||
return this.put(settings.url, settings.data, settings.headers);
|
||||
}
|
||||
case 'DELETE': {
|
||||
return this.delete(settings.url, settings.headers);
|
||||
const method = (settings.method ?? 'GET').toUpperCase();
|
||||
const url = new URL(settings.url);
|
||||
|
||||
let data: unknown;
|
||||
|
||||
if (settings.data) {
|
||||
if (method === 'POST') {
|
||||
data = settings.data;
|
||||
} else {
|
||||
const searchParams = new URLSearchParams(settings.data);
|
||||
|
||||
searchParams.forEach((value, key) => {
|
||||
url.searchParams.append(key, value);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async get<T>(url: string, headers: HttpHeaders) {
|
||||
return CapacitorHttp.get({url, headers}).then((response: HttpResponse) => response.data as T);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
private async post<T>(url: string, data: any, headers: HttpHeaders) {
|
||||
return CapacitorHttp.post({
|
||||
url,
|
||||
const options: HttpOptions = {
|
||||
url: url.toString(),
|
||||
method,
|
||||
headers: this.getHeaders(settings.headers),
|
||||
data,
|
||||
headers,
|
||||
}).then((response: HttpResponse) => {
|
||||
return response.data as T;
|
||||
});
|
||||
};
|
||||
|
||||
if (settings.dataType?.toLowerCase() === 'json') {
|
||||
options.responseType = 'json';
|
||||
}
|
||||
|
||||
const response = await CapacitorHttp.request(options);
|
||||
|
||||
if (response.status < 200 || response.status >= 300) {
|
||||
throw new AppAuthError(
|
||||
`HTTP ${response.status}`,
|
||||
response.data,
|
||||
);
|
||||
}
|
||||
|
||||
return response.data as T;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
private async put<T>(url: string, data: any, headers: HttpHeaders) {
|
||||
return CapacitorHttp.put({
|
||||
url,
|
||||
data,
|
||||
headers,
|
||||
}).then((response: HttpResponse) => response.data as T);
|
||||
}
|
||||
private getHeaders(headers: XhrSettings['headers']): HttpHeaders {
|
||||
const result: HttpHeaders = {};
|
||||
|
||||
private async delete<T>(url: string, headers: HttpHeaders) {
|
||||
return CapacitorHttp.delete({url, headers}).then((response: HttpResponse) => response.data as T);
|
||||
if (!headers) {
|
||||
return result;
|
||||
}
|
||||
|
||||
for (const [key, value] of Object.entries(headers)) {
|
||||
if (value !== undefined && value !== null) {
|
||||
result[key] = String(value);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
import {StorageProvider} from '../storage/storage.provider';
|
||||
import {DefaultAuthService} from './default-auth.service';
|
||||
import {Browser} from 'ionic-appauth';
|
||||
import {nowInSeconds, Requestor, StorageBackend} from '@openid/appauth';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {StAppsWebHttpClient} from '../data/stapps-web-http-client.provider';
|
||||
import {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
import {IonicStorage} from 'ionic-appauth/lib';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {LoggerTestingModule} from 'ngx-logger/testing';
|
||||
|
||||
describe('AuthService', () => {
|
||||
let defaultAuthService: DefaultAuthService;
|
||||
let storageBackendSpy: jasmine.SpyObj<StorageBackend>;
|
||||
const storageProviderSpy = jasmine.createSpyObj('StorageProvider', ['init', 'get', 'has', 'put', 'search']);
|
||||
const translateServiceSpy = jasmine.createSpyObj('TranslateService', ['setDefaultLang', 'use']);
|
||||
|
||||
beforeEach(() => {
|
||||
storageBackendSpy = jasmine.createSpyObj('StorageBackend', ['getItem']);
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [LoggerTestingModule, RouterModule.forRoot([])],
|
||||
providers: [
|
||||
StAppsWebHttpClient,
|
||||
{
|
||||
provide: TranslateService,
|
||||
useValue: translateServiceSpy,
|
||||
},
|
||||
{
|
||||
provide: StorageProvider,
|
||||
useValue: storageProviderSpy,
|
||||
},
|
||||
IonicStorage,
|
||||
ConfigProvider,
|
||||
Browser,
|
||||
{
|
||||
provide: StorageBackend,
|
||||
useValue: storageBackendSpy,
|
||||
},
|
||||
Requestor,
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
],
|
||||
});
|
||||
defaultAuthService = TestBed.inject(DefaultAuthService);
|
||||
});
|
||||
|
||||
describe('loadTokenFromStorage', () => {
|
||||
it('should provide false through isAuthenticated$ when there is no token response', async () => {
|
||||
// eslint-disable-next-line unicorn/no-null
|
||||
storageBackendSpy.getItem.and.returnValue(Promise.resolve(null));
|
||||
let loggedInHolder;
|
||||
defaultAuthService.isAuthenticated$.subscribe(loggedIn => {
|
||||
loggedInHolder = loggedIn;
|
||||
});
|
||||
await defaultAuthService.loadTokenFromStorage();
|
||||
|
||||
expect(loggedInHolder).toBeFalse();
|
||||
});
|
||||
|
||||
it('should provide true through isAuthenticated$ when access token is valid', async () => {
|
||||
const validToken = `{"access_token":"AT-XXXX","refresh_token":"RT-XXXX","scope":"","token_type":"bearer","issued_at":${nowInSeconds()},"expires_in":"${
|
||||
8 * 60 * 60
|
||||
}"}`;
|
||||
storageBackendSpy.getItem.and.returnValue(Promise.resolve(validToken));
|
||||
let loggedInHolder;
|
||||
defaultAuthService.isAuthenticated$.subscribe(loggedIn => {
|
||||
loggedInHolder = loggedIn;
|
||||
});
|
||||
await defaultAuthService.loadTokenFromStorage();
|
||||
|
||||
expect(loggedInHolder).toBeTrue();
|
||||
});
|
||||
|
||||
it('should provide false through isAuthenticated$ when access token is invalid', async () => {
|
||||
const invalidToken = `{"access_token":"AT-INVALID-XXXX","refresh_token":"RT-XXXX","scope":"","token_type":"bearer","issued_at":${
|
||||
nowInSeconds() - 9 * 60 * 60
|
||||
},"expires_in":"${8 * 60 * 60}"}`;
|
||||
storageBackendSpy.getItem.and.returnValue(Promise.resolve(invalidToken));
|
||||
let loggedInHolder;
|
||||
defaultAuthService.isAuthenticated$.subscribe(loggedIn => {
|
||||
loggedInHolder = loggedIn;
|
||||
});
|
||||
await defaultAuthService.loadTokenFromStorage();
|
||||
|
||||
expect(loggedInHolder).toBeFalse();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,91 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {
|
||||
AuthorizationRequestHandler,
|
||||
AuthorizationServiceConfiguration,
|
||||
JQueryRequestor,
|
||||
LocalStorageBackend,
|
||||
Requestor,
|
||||
StorageBackend,
|
||||
TokenRequestHandler,
|
||||
} from '@openid/appauth';
|
||||
import {AuthActionBuilder, Browser, DefaultBrowser, EndSessionHandler, UserInfoHandler} from 'ionic-appauth';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
import {SCAuthorizationProvider} from '@openstapps/core';
|
||||
import {getClientConfig, getEndpointsConfig} from './auth.provider.methods';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {AuthService} from './auth.service';
|
||||
|
||||
const TOKEN_RESPONSE_KEY = 'token_response';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class DefaultAuthService extends AuthService {
|
||||
public localConfiguration: AuthorizationServiceConfiguration;
|
||||
|
||||
protected tokenHandler: TokenRequestHandler;
|
||||
|
||||
protected userInfoHandler: UserInfoHandler;
|
||||
|
||||
protected requestHandler: AuthorizationRequestHandler;
|
||||
|
||||
protected endSessionHandler: EndSessionHandler;
|
||||
|
||||
constructor(
|
||||
protected browser: Browser = new DefaultBrowser(),
|
||||
protected storage: StorageBackend = new LocalStorageBackend(),
|
||||
protected requestor: Requestor = new JQueryRequestor(),
|
||||
private readonly configProvider: ConfigProvider,
|
||||
) {
|
||||
super(browser, storage, requestor);
|
||||
}
|
||||
|
||||
get configuration(): Promise<AuthorizationServiceConfiguration> {
|
||||
if (!this.localConfiguration) throw new Error('Local Configuration Not Defined');
|
||||
|
||||
return Promise.resolve(this.localConfiguration);
|
||||
}
|
||||
|
||||
public async init() {
|
||||
this.setupConfiguration();
|
||||
this.setupAuthorizationNotifier();
|
||||
await this.loadTokenFromStorage();
|
||||
}
|
||||
|
||||
setupConfiguration() {
|
||||
const authConfig = this.configProvider.getAnyValue('auth') as {
|
||||
default: SCAuthorizationProvider;
|
||||
};
|
||||
this.authConfig = getClientConfig('default', authConfig);
|
||||
this.localConfiguration = new AuthorizationServiceConfiguration(
|
||||
getEndpointsConfig('default', authConfig),
|
||||
);
|
||||
}
|
||||
|
||||
public async signOut() {
|
||||
await this.revokeTokens().catch(error => {
|
||||
this.notifyActionListers(AuthActionBuilder.SignOutFailed(error));
|
||||
});
|
||||
this.notifyActionListers(AuthActionBuilder.SignOutSuccess());
|
||||
}
|
||||
|
||||
public async revokeTokens() {
|
||||
// Note: only locally
|
||||
await this.storage.removeItem(TOKEN_RESPONSE_KEY);
|
||||
this.notifyActionListers(AuthActionBuilder.RevokeTokensSuccess());
|
||||
}
|
||||
}
|
||||
+5
-4
@@ -13,11 +13,12 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {Platform} from '@ionic/angular/standalone';
|
||||
import {FetchRequestor, Requestor} from '@openid/appauth';
|
||||
import {CapacitorRequestor} from '../capacitor-requestor';
|
||||
import {NgHttpService} from '../ng-http.service';
|
||||
|
||||
export const httpFactory = (platform: Platform, httpClient: HttpClient) => {
|
||||
return platform.is('capacitor') ? new CapacitorRequestor() : new NgHttpService(httpClient);
|
||||
export const requestorFactory = (platform: Platform): Requestor => {
|
||||
return platform.is('capacitor')
|
||||
? new CapacitorRequestor()
|
||||
: new FetchRequestor();
|
||||
};
|
||||
@@ -14,9 +14,11 @@
|
||||
*/
|
||||
|
||||
import {Platform} from '@ionic/angular/standalone';
|
||||
import {IonicStorage} from 'ionic-appauth/lib';
|
||||
import {LocalStorageBackend, StorageBackend} from '@openid/appauth';
|
||||
import {SafeCapacitorSecureStorage} from '../../storage/capacitor-secure-storage';
|
||||
|
||||
export const storageFactory = (platform: Platform) => {
|
||||
return platform.is('capacitor') ? new SafeCapacitorSecureStorage() : new IonicStorage();
|
||||
export const storageFactory = (platform: Platform): StorageBackend => {
|
||||
return platform.is('capacitor')
|
||||
? new SafeCapacitorSecureStorage()
|
||||
: new LocalStorageBackend();
|
||||
};
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Requestor} from '@openid/appauth';
|
||||
import {HttpClient, HttpHeaders} from '@angular/common/http';
|
||||
import {XhrSettings} from 'ionic-appauth/lib/cordova';
|
||||
import {firstValueFrom, Observable} from 'rxjs';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class NgHttpService implements Requestor {
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
public async xhr<T>(settings: XhrSettings): Promise<T> {
|
||||
if (!settings.method) {
|
||||
settings.method = 'GET';
|
||||
}
|
||||
|
||||
let observable: Observable<T>;
|
||||
|
||||
switch (settings.method) {
|
||||
case 'GET': {
|
||||
observable = this.http.get<T>(settings.url, {
|
||||
headers: this.getHeaders(settings.headers),
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'POST': {
|
||||
observable = this.http.post<T>(settings.url, settings.data, {
|
||||
headers: this.getHeaders(settings.headers),
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'PUT': {
|
||||
observable = this.http.put<T>(settings.url, settings.data, {
|
||||
headers: this.getHeaders(settings.headers),
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'DELETE': {
|
||||
observable = this.http.delete<T>(settings.url, {
|
||||
headers: this.getHeaders(settings.headers),
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return firstValueFrom(observable);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
private getHeaders(headers: any): HttpHeaders {
|
||||
let httpHeaders: HttpHeaders = new HttpHeaders();
|
||||
|
||||
if (headers !== undefined) {
|
||||
for (const key of Object.keys(headers)) {
|
||||
httpHeaders = httpHeaders.append(key, headers[key]);
|
||||
}
|
||||
}
|
||||
|
||||
return httpHeaders;
|
||||
}
|
||||
}
|
||||
@@ -1,197 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {
|
||||
StorageBackend,
|
||||
BasicQueryStringUtils,
|
||||
DefaultCrypto,
|
||||
AuthorizationServiceConfiguration,
|
||||
AuthorizationRequest,
|
||||
StringMap,
|
||||
AuthorizationError,
|
||||
AuthorizationErrorJson,
|
||||
BUILT_IN_PARAMETERS,
|
||||
} from '@openid/appauth';
|
||||
import {Browser} from 'ionic-appauth';
|
||||
import {PAIAAuthorizationNotifier} from './paia-authorization-notifier';
|
||||
import {PAIAAuthorizationRequestResponse} from './authorization-request-response';
|
||||
import {PAIAAuthorizationResponse, PAIAAuthorizationResponseJson} from './paia-authorization-response';
|
||||
|
||||
/** key for authorization request. */
|
||||
const authorizationRequestKey = (handle: string) => {
|
||||
return `${handle}_appauth_authorization_request`;
|
||||
};
|
||||
|
||||
/** key in local storage which represents the current authorization request. */
|
||||
const AUTHORIZATION_REQUEST_HANDLE_KEY = 'appauth_current_authorization_request';
|
||||
export const AUTHORIZATION_RESPONSE_KEY = 'auth_response';
|
||||
|
||||
export class PAIAAuthorizationRequestHandler {
|
||||
notifier: PAIAAuthorizationNotifier;
|
||||
|
||||
constructor(
|
||||
private browser: Browser,
|
||||
private storage: StorageBackend,
|
||||
public utils = new BasicQueryStringUtils(),
|
||||
protected crypto = new Crypto(),
|
||||
private generateRandom = new DefaultCrypto(),
|
||||
) {}
|
||||
|
||||
public async performAuthorizationRequest(
|
||||
configuration: AuthorizationServiceConfiguration,
|
||||
request: AuthorizationRequest,
|
||||
): Promise<void> {
|
||||
const handle = this.generateRandom.generateRandom(10);
|
||||
await this.storage.setItem(AUTHORIZATION_REQUEST_HANDLE_KEY, handle);
|
||||
await this.storage.setItem(authorizationRequestKey(handle), JSON.stringify(await request.toJson()));
|
||||
const url = this.buildRequestUrl(configuration, request);
|
||||
const returnedUrl: string | undefined = await this.browser.showWindow(url, request.redirectUri);
|
||||
|
||||
// callback may come from showWindow or via another method
|
||||
if (returnedUrl !== undefined) {
|
||||
await this.storage.setItem(AUTHORIZATION_RESPONSE_KEY, returnedUrl);
|
||||
await this.completeAuthorizationRequestIfPossible();
|
||||
}
|
||||
}
|
||||
|
||||
protected async completeAuthorizationRequest(): Promise<PAIAAuthorizationRequestResponse> {
|
||||
const handle = await this.storage.getItem(AUTHORIZATION_REQUEST_HANDLE_KEY);
|
||||
|
||||
if (!handle) {
|
||||
throw new Error('Handle Not Available');
|
||||
}
|
||||
|
||||
const request: AuthorizationRequest = this.getAuthorizationRequest(
|
||||
await this.storage.getItem(authorizationRequestKey(handle)),
|
||||
);
|
||||
const queryParameters = this.getQueryParams(await this.storage.getItem(AUTHORIZATION_RESPONSE_KEY));
|
||||
void this.removeItemsFromStorage(handle);
|
||||
|
||||
const state: string | undefined = queryParameters['state'];
|
||||
const error: string | undefined = queryParameters['error'];
|
||||
|
||||
if (state !== request.state) {
|
||||
throw new Error('State Does Not Match');
|
||||
}
|
||||
|
||||
return <PAIAAuthorizationRequestResponse>{
|
||||
request: request, // request
|
||||
response: error ? undefined : this.getAuthorizationResponse(queryParameters),
|
||||
error: error ? this.getAuthorizationError(queryParameters) : undefined,
|
||||
};
|
||||
}
|
||||
|
||||
private getAuthorizationRequest(authRequest: string | null): AuthorizationRequest {
|
||||
if (authRequest == undefined) {
|
||||
throw new Error('No Auth Request Available');
|
||||
}
|
||||
|
||||
return new AuthorizationRequest(JSON.parse(authRequest));
|
||||
}
|
||||
|
||||
private getAuthorizationError(queryParameters: StringMap): AuthorizationError {
|
||||
const authorizationErrorJSON: AuthorizationErrorJson = {
|
||||
error: queryParameters['error'],
|
||||
error_description: queryParameters['error_description'],
|
||||
error_uri: undefined,
|
||||
state: queryParameters['state'],
|
||||
};
|
||||
return new AuthorizationError(authorizationErrorJSON);
|
||||
}
|
||||
|
||||
private getAuthorizationResponse(queryParameters: StringMap): PAIAAuthorizationResponse {
|
||||
const authorizationResponseJSON: PAIAAuthorizationResponseJson = {
|
||||
code: queryParameters['code'],
|
||||
patron: queryParameters['patron'],
|
||||
// TODO: currently PAIA is not providing state
|
||||
state: queryParameters['state'] ?? '',
|
||||
};
|
||||
return new PAIAAuthorizationResponse(authorizationResponseJSON);
|
||||
}
|
||||
|
||||
private async removeItemsFromStorage(handle: string): Promise<void> {
|
||||
await this.storage.removeItem(AUTHORIZATION_REQUEST_HANDLE_KEY);
|
||||
await this.storage.removeItem(authorizationRequestKey(handle));
|
||||
await this.storage.removeItem(AUTHORIZATION_RESPONSE_KEY);
|
||||
}
|
||||
|
||||
private getQueryParams(authResponse: string | null): StringMap {
|
||||
if (authResponse == undefined) {
|
||||
return {};
|
||||
} else {
|
||||
const querySide: string = authResponse.split('#')[0];
|
||||
const parts: string[] = querySide.split('?');
|
||||
if (parts.length !== 2) throw new Error('Invalid auth response string');
|
||||
const hash = parts[1];
|
||||
return this.utils.parseQueryString(hash);
|
||||
}
|
||||
}
|
||||
|
||||
setAuthorizationNotifier(notifier: PAIAAuthorizationNotifier): PAIAAuthorizationRequestHandler {
|
||||
this.notifier = notifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
completeAuthorizationRequestIfPossible(): Promise<void> {
|
||||
// call complete authorization if possible to see there might
|
||||
// be a response that needs to be delivered.
|
||||
console.log(`Checking to see if there is an authorization response to be delivered.`);
|
||||
if (!this.notifier) {
|
||||
console.log(`Notifier is not present on AuthorizationRequest handler.
|
||||
No delivery of result will be possible`);
|
||||
}
|
||||
return this.completeAuthorizationRequest().then(result => {
|
||||
if (!result) {
|
||||
console.log(`No result is available yet.`);
|
||||
}
|
||||
if (result && this.notifier) {
|
||||
this.notifier.onAuthorizationComplete(result.request, result.response, result.error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* A utility method to be able to build the authorization request URL.
|
||||
*/
|
||||
protected buildRequestUrl(configuration: AuthorizationServiceConfiguration, request: AuthorizationRequest) {
|
||||
// build the query string
|
||||
// coerce to any type for convenience
|
||||
const requestMap: StringMap = {
|
||||
redirect_uri: request.redirectUri,
|
||||
client_id: request.clientId,
|
||||
response_type: request.responseType,
|
||||
state: request.state,
|
||||
scope: request.scope,
|
||||
};
|
||||
|
||||
// copy over extras
|
||||
if (request.extras) {
|
||||
for (const extra in request.extras) {
|
||||
if (
|
||||
request.extras.hasOwnProperty(extra) && // check before inserting to requestMap
|
||||
!BUILT_IN_PARAMETERS.includes(extra)
|
||||
) {
|
||||
requestMap[extra] = request.extras[extra];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const query = this.utils.stringify(requestMap);
|
||||
const baseUrl = configuration.authorizationEndpoint;
|
||||
|
||||
// required encoding (PAIA specific)
|
||||
return `${baseUrl}?${encodeURIComponent(query)}`;
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {AuthorizationError, AuthorizationRequest} from '@openid/appauth';
|
||||
import {PAIAAuthorizationResponse} from './paia-authorization-response';
|
||||
|
||||
/**
|
||||
* Represents a structural type holding both authorization request and response.
|
||||
*/
|
||||
export interface PAIAAuthorizationRequestResponse {
|
||||
request: AuthorizationRequest;
|
||||
response: PAIAAuthorizationResponse | null;
|
||||
error: AuthorizationError | null;
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {PAIATokenResponse} from './paia-token-response';
|
||||
import {AuthActionBuilder, IAuthAction} from 'ionic-appauth';
|
||||
|
||||
export interface IPAIAAuthAction extends IAuthAction {
|
||||
tokenResponse?: PAIATokenResponse;
|
||||
}
|
||||
|
||||
export class PAIAAuthActionBuilder extends AuthActionBuilder {
|
||||
public static Init(): IPAIAAuthAction {
|
||||
return AuthActionBuilder.Init() as IPAIAAuthAction;
|
||||
}
|
||||
|
||||
public static SignOutSuccess(): IPAIAAuthAction {
|
||||
return AuthActionBuilder.SignOutSuccess() as IPAIAAuthAction;
|
||||
}
|
||||
|
||||
public static SignOutFailed(error: Error): IPAIAAuthAction {
|
||||
return AuthActionBuilder.SignOutFailed(error) as IPAIAAuthAction;
|
||||
}
|
||||
|
||||
public static RefreshSuccess(tokenResponse: PAIATokenResponse): IPAIAAuthAction {
|
||||
return AuthActionBuilder.RefreshSuccess(tokenResponse) as IPAIAAuthAction;
|
||||
}
|
||||
|
||||
public static RefreshFailed(error: Error): IPAIAAuthAction {
|
||||
return AuthActionBuilder.RefreshFailed(error) as IPAIAAuthAction;
|
||||
}
|
||||
|
||||
public static SignInSuccess(tokenResponse: PAIATokenResponse): IPAIAAuthAction {
|
||||
return AuthActionBuilder.SignInSuccess(tokenResponse) as IPAIAAuthAction;
|
||||
}
|
||||
|
||||
public static SignInFailed(error: Error): IPAIAAuthAction {
|
||||
return AuthActionBuilder.SignInFailed(error) as IPAIAAuthAction;
|
||||
}
|
||||
|
||||
public static LoadTokenFromStorageSuccess(tokenResponse: PAIATokenResponse): IPAIAAuthAction {
|
||||
return AuthActionBuilder.LoadTokenFromStorageSuccess(tokenResponse) as IPAIAAuthAction;
|
||||
}
|
||||
|
||||
public static LoadTokenFromStorageFailed(error: Error): IPAIAAuthAction {
|
||||
return AuthActionBuilder.LoadTokenFromStorageFailed(error) as IPAIAAuthAction;
|
||||
}
|
||||
|
||||
public static RevokeTokensSuccess(): IPAIAAuthAction {
|
||||
return AuthActionBuilder.RevokeTokensSuccess() as IPAIAAuthAction;
|
||||
}
|
||||
|
||||
public static RevokeTokensFailed(error: Error): IPAIAAuthAction {
|
||||
return AuthActionBuilder.RevokeTokensFailed(error) as IPAIAAuthAction;
|
||||
}
|
||||
|
||||
public static LoadUserInfoSuccess(user: Error): IPAIAAuthAction {
|
||||
return AuthActionBuilder.LoadUserInfoSuccess(user) as IPAIAAuthAction;
|
||||
}
|
||||
|
||||
public static LoadUserInfoFailed(error: Error): IPAIAAuthAction {
|
||||
return AuthActionBuilder.LoadUserInfoFailed(error) as IPAIAAuthAction;
|
||||
}
|
||||
}
|
||||
@@ -1,365 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {
|
||||
AuthorizationError,
|
||||
AuthorizationRequest,
|
||||
AuthorizationRequestJson,
|
||||
AuthorizationServiceConfiguration,
|
||||
BasicQueryStringUtils,
|
||||
DefaultCrypto,
|
||||
JQueryRequestor,
|
||||
LocalStorageBackend,
|
||||
Requestor,
|
||||
StorageBackend,
|
||||
StringMap,
|
||||
TokenResponse,
|
||||
} from '@openid/appauth';
|
||||
import {
|
||||
AuthActions,
|
||||
AUTHORIZATION_RESPONSE_KEY,
|
||||
AuthSubject,
|
||||
Browser,
|
||||
DefaultBrowser,
|
||||
EndSessionHandler,
|
||||
IAuthConfig,
|
||||
IonicEndSessionHandler,
|
||||
IonicUserInfoHandler,
|
||||
UserInfoHandler,
|
||||
} from 'ionic-appauth';
|
||||
import {BehaviorSubject, Observable} from 'rxjs';
|
||||
import {PAIATokenRequestHandler} from './token-request-handler';
|
||||
import {PAIAAuthorizationRequestHandler} from './authorization-request-handler';
|
||||
import {PAIATokenRequest, PAIATokenRequestJson} from './paia-token-request';
|
||||
import {PAIAAuthorizationResponse} from './paia-authorization-response';
|
||||
import {PAIAAuthorizationNotifier} from './paia-authorization-notifier';
|
||||
import {PAIATokenResponse} from './paia-token-response';
|
||||
import {IPAIAAuthAction, PAIAAuthActionBuilder} from './paia-auth-action';
|
||||
import {SCAuthorizationProvider} from '@openstapps/core';
|
||||
import {ConfigProvider} from '../../config/config.provider';
|
||||
import {getClientConfig, getEndpointsConfig} from '../auth.provider.methods';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
const TOKEN_RESPONSE_KEY = 'paia_token_response';
|
||||
const AUTH_EXPIRY_BUFFER = 10 * 60 * -1; // 10 minutes in seconds
|
||||
|
||||
export interface IAuthService {
|
||||
signIn(authExtras?: StringMap, state?: string): void;
|
||||
signOut(state?: string, revokeTokens?: boolean): void;
|
||||
loadUserInfo(): void;
|
||||
authorizationCallback(callbackUrl: string): void;
|
||||
loadTokenFromStorage(): void;
|
||||
getValidToken(buffer?: number): Promise<PAIATokenResponse>;
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PAIAAuthService {
|
||||
private _authConfig?: IAuthConfig;
|
||||
|
||||
private _authSubject: AuthSubject = new AuthSubject();
|
||||
|
||||
private _authSubjectV2 = new BehaviorSubject<IPAIAAuthAction>(PAIAAuthActionBuilder.Init());
|
||||
|
||||
private _tokenSubject = new BehaviorSubject<PAIATokenResponse | undefined>(undefined);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
private _userSubject = new BehaviorSubject<any>(undefined);
|
||||
|
||||
private _authenticatedSubject = new BehaviorSubject<boolean>(false);
|
||||
|
||||
private _loggedIn = new BehaviorSubject<boolean>(false);
|
||||
|
||||
private _initComplete = new BehaviorSubject<boolean>(false);
|
||||
|
||||
protected tokenHandler: PAIATokenRequestHandler;
|
||||
|
||||
protected userInfoHandler: UserInfoHandler;
|
||||
|
||||
protected requestHandler: PAIAAuthorizationRequestHandler;
|
||||
|
||||
protected endSessionHandler: EndSessionHandler;
|
||||
|
||||
public localConfiguration: AuthorizationServiceConfiguration;
|
||||
|
||||
constructor(
|
||||
protected browser: Browser = new DefaultBrowser(),
|
||||
protected storage: StorageBackend = new LocalStorageBackend(),
|
||||
protected requestor: Requestor = new JQueryRequestor(),
|
||||
private readonly configProvider: ConfigProvider,
|
||||
) {
|
||||
this.tokenHandler = new PAIATokenRequestHandler(requestor);
|
||||
this.userInfoHandler = new IonicUserInfoHandler(requestor);
|
||||
this.requestHandler = new PAIAAuthorizationRequestHandler(
|
||||
browser,
|
||||
storage,
|
||||
new BasicQueryStringUtils(),
|
||||
crypto,
|
||||
);
|
||||
this.endSessionHandler = new IonicEndSessionHandler(browser);
|
||||
}
|
||||
|
||||
get token$(): Observable<PAIATokenResponse | undefined> {
|
||||
return this._tokenSubject.asObservable();
|
||||
}
|
||||
|
||||
get isAuthenticated$(): Observable<boolean> {
|
||||
return this._authenticatedSubject.asObservable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to isAuthenticated$, but will also return true if the token is expired
|
||||
*/
|
||||
get isLoggedIn$(): Observable<boolean> {
|
||||
return this._loggedIn.asObservable();
|
||||
}
|
||||
|
||||
get initComplete$(): Observable<boolean> {
|
||||
return this._initComplete.asObservable();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
get user$(): Observable<any> {
|
||||
return this._userSubject.asObservable();
|
||||
}
|
||||
|
||||
get events$(): Observable<IPAIAAuthAction> {
|
||||
return this._authSubjectV2.asObservable();
|
||||
}
|
||||
|
||||
get authConfig(): IAuthConfig {
|
||||
if (!this._authConfig) throw new Error('AuthConfig Not Defined');
|
||||
|
||||
return this._authConfig;
|
||||
}
|
||||
|
||||
set authConfig(value: IAuthConfig) {
|
||||
this._authConfig = value;
|
||||
}
|
||||
|
||||
get configuration(): Promise<AuthorizationServiceConfiguration> {
|
||||
if (!this.localConfiguration) throw new Error('Local Configuration Not Defined');
|
||||
|
||||
return Promise.resolve(this.localConfiguration);
|
||||
}
|
||||
|
||||
public async init() {
|
||||
this.setupConfiguration();
|
||||
this.setupAuthorizationNotifier();
|
||||
await this.loadTokenFromStorage();
|
||||
}
|
||||
|
||||
setupConfiguration() {
|
||||
const authConfig = this.configProvider.getAnyValue('auth') as {
|
||||
paia: SCAuthorizationProvider;
|
||||
};
|
||||
this.authConfig = getClientConfig('paia', authConfig);
|
||||
this.localConfiguration = new AuthorizationServiceConfiguration(getEndpointsConfig('paia', authConfig));
|
||||
}
|
||||
|
||||
protected notifyActionListers(action: IPAIAAuthAction) {
|
||||
/* eslint-disable unicorn/no-useless-undefined */
|
||||
switch (action.action) {
|
||||
case AuthActions.SignInFailed:
|
||||
case AuthActions.SignOutSuccess:
|
||||
case AuthActions.SignOutFailed: {
|
||||
this._tokenSubject.next(undefined);
|
||||
this._userSubject.next(undefined);
|
||||
this._authenticatedSubject.next(false);
|
||||
this._loggedIn.next(false);
|
||||
break;
|
||||
}
|
||||
case AuthActions.LoadTokenFromStorageFailed: {
|
||||
this._tokenSubject.next(undefined);
|
||||
this._userSubject.next(undefined);
|
||||
this._authenticatedSubject.next(false);
|
||||
this._loggedIn.next(false);
|
||||
this._initComplete.next(true);
|
||||
break;
|
||||
}
|
||||
case AuthActions.SignInSuccess: {
|
||||
this._tokenSubject.next(action.tokenResponse);
|
||||
this._authenticatedSubject.next(true);
|
||||
this._loggedIn.next(true);
|
||||
break;
|
||||
}
|
||||
case AuthActions.LoadTokenFromStorageSuccess: {
|
||||
this._tokenSubject.next(action.tokenResponse);
|
||||
this._authenticatedSubject.next((action.tokenResponse as TokenResponse).isValid(0));
|
||||
this._loggedIn.next(true);
|
||||
this._initComplete.next(true);
|
||||
break;
|
||||
}
|
||||
case AuthActions.RevokeTokensSuccess: {
|
||||
this._tokenSubject.next(undefined);
|
||||
break;
|
||||
}
|
||||
case AuthActions.LoadUserInfoSuccess: {
|
||||
this._userSubject.next(action.user);
|
||||
break;
|
||||
}
|
||||
case AuthActions.LoadUserInfoFailed: {
|
||||
this._userSubject.next(undefined);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this._authSubjectV2.next(action);
|
||||
this._authSubject.notify(action);
|
||||
}
|
||||
|
||||
protected setupAuthorizationNotifier() {
|
||||
const notifier = new PAIAAuthorizationNotifier();
|
||||
this.requestHandler.setAuthorizationNotifier(notifier);
|
||||
notifier.setAuthorizationListener((request, response, error) =>
|
||||
this.onAuthorizationNotification(request, response, error),
|
||||
);
|
||||
}
|
||||
|
||||
protected onAuthorizationNotification(
|
||||
request: AuthorizationRequest,
|
||||
response: PAIAAuthorizationResponse | null,
|
||||
error: AuthorizationError | null,
|
||||
) {
|
||||
const codeVerifier: string | undefined =
|
||||
request.internal != undefined && this.authConfig.pkce ? request.internal.code_verifier : undefined;
|
||||
|
||||
if (response != undefined) {
|
||||
this.requestAccessToken(response.code, response.patron, codeVerifier);
|
||||
} else if (error == undefined) {
|
||||
throw new Error('Unknown Error With Authentication');
|
||||
} else {
|
||||
throw new Error(error.errorDescription);
|
||||
}
|
||||
}
|
||||
|
||||
protected async internalAuthorizationCallback(url: string) {
|
||||
this.browser.closeWindow();
|
||||
await this.storage.setItem(AUTHORIZATION_RESPONSE_KEY, url);
|
||||
return this.requestHandler.completeAuthorizationRequestIfPossible();
|
||||
}
|
||||
|
||||
protected async performAuthorizationRequest(authExtras?: StringMap, state?: string): Promise<void> {
|
||||
const requestJson: AuthorizationRequestJson = {
|
||||
response_type: AuthorizationRequest.RESPONSE_TYPE_CODE,
|
||||
client_id: this.authConfig.client_id,
|
||||
redirect_uri: this.authConfig.redirect_url,
|
||||
scope: this.authConfig.scopes,
|
||||
extras: authExtras,
|
||||
state: state || undefined,
|
||||
};
|
||||
|
||||
const request = new AuthorizationRequest(requestJson, new DefaultCrypto(), this.authConfig.pkce);
|
||||
|
||||
if (this.authConfig.pkce) await request.setupCodeVerifier();
|
||||
|
||||
return this.requestHandler.performAuthorizationRequest(await this.configuration, request);
|
||||
}
|
||||
|
||||
protected async requestAccessToken(code: string, patron: string, codeVerifier?: string): Promise<void> {
|
||||
const requestJSON: PAIATokenRequestJson = {
|
||||
code: code,
|
||||
patron: patron,
|
||||
extras: codeVerifier
|
||||
? {
|
||||
code_verifier: codeVerifier,
|
||||
}
|
||||
: {},
|
||||
};
|
||||
|
||||
const token: PAIATokenResponse = await this.tokenHandler.performTokenRequest(
|
||||
await this.configuration,
|
||||
new PAIATokenRequest(requestJSON),
|
||||
);
|
||||
await this.storage.setItem(TOKEN_RESPONSE_KEY, JSON.stringify(token.toJson()));
|
||||
this.notifyActionListers(PAIAAuthActionBuilder.SignInSuccess(token));
|
||||
}
|
||||
|
||||
public async revokeTokens() {
|
||||
// Note: only locally
|
||||
await this.storage.removeItem(TOKEN_RESPONSE_KEY);
|
||||
this.notifyActionListers(PAIAAuthActionBuilder.RevokeTokensSuccess());
|
||||
}
|
||||
|
||||
public async signOut() {
|
||||
await this.revokeTokens().catch(error =>
|
||||
this.notifyActionListers(PAIAAuthActionBuilder.SignOutFailed(error)),
|
||||
);
|
||||
this.notifyActionListers(PAIAAuthActionBuilder.SignOutSuccess());
|
||||
}
|
||||
|
||||
protected async internalLoadTokenFromStorage() {
|
||||
let token: PAIATokenResponse | undefined;
|
||||
const tokenResponseString: string | null = await this.storage.getItem(TOKEN_RESPONSE_KEY);
|
||||
|
||||
if (tokenResponseString != undefined) {
|
||||
token = new PAIATokenResponse(JSON.parse(tokenResponseString));
|
||||
|
||||
if (token) {
|
||||
return this.notifyActionListers(PAIAAuthActionBuilder.LoadTokenFromStorageSuccess(token));
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error('No Token In Storage');
|
||||
}
|
||||
|
||||
protected async internalRequestUserInfo() {
|
||||
if (this._tokenSubject.value) {
|
||||
const userInfo = await this.userInfoHandler.performUserInfoRequest(
|
||||
await this.configuration,
|
||||
this._tokenSubject.value,
|
||||
);
|
||||
this.notifyActionListers(PAIAAuthActionBuilder.LoadUserInfoSuccess(userInfo));
|
||||
} else {
|
||||
throw new Error('No Token Available');
|
||||
}
|
||||
}
|
||||
|
||||
public async loadTokenFromStorage() {
|
||||
await this.internalLoadTokenFromStorage().catch(error => {
|
||||
this.notifyActionListers(PAIAAuthActionBuilder.LoadTokenFromStorageFailed(error));
|
||||
});
|
||||
}
|
||||
|
||||
public async signIn(authExtras?: StringMap, state?: string) {
|
||||
await this.performAuthorizationRequest(authExtras, state).catch(error => {
|
||||
this.notifyActionListers(PAIAAuthActionBuilder.SignInFailed(error));
|
||||
});
|
||||
}
|
||||
|
||||
public async loadUserInfo() {
|
||||
await this.internalRequestUserInfo().catch(error => {
|
||||
this.notifyActionListers(PAIAAuthActionBuilder.LoadUserInfoFailed(error));
|
||||
});
|
||||
}
|
||||
|
||||
public authorizationCallback(callbackUrl: string): void {
|
||||
this.internalAuthorizationCallback(callbackUrl).catch(error => {
|
||||
this.notifyActionListers(PAIAAuthActionBuilder.SignInFailed(error));
|
||||
});
|
||||
}
|
||||
|
||||
public async getValidToken(buffer: number = AUTH_EXPIRY_BUFFER): Promise<PAIATokenResponse> {
|
||||
if (this._tokenSubject.value && this._tokenSubject.value.isValid(buffer)) {
|
||||
return this._tokenSubject.value;
|
||||
}
|
||||
|
||||
const error = new Error('Unable To Obtain Valid Token');
|
||||
this.notifyActionListers(PAIAAuthActionBuilder.SignInFailed(error));
|
||||
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {AuthorizationError, AuthorizationRequest} from '@openid/appauth';
|
||||
import {PAIAAuthorizationResponse} from './paia-authorization-response';
|
||||
|
||||
export type PAIAAuthorizationListener = (
|
||||
request: AuthorizationRequest,
|
||||
response: PAIAAuthorizationResponse | null,
|
||||
error: AuthorizationError | null,
|
||||
) => void;
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {PAIAAuthorizationListener} from './paia-authorization-listener';
|
||||
import {AuthorizationError, AuthorizationRequest} from '@openid/appauth';
|
||||
import {PAIAAuthorizationResponse} from './paia-authorization-response';
|
||||
|
||||
export class PAIAAuthorizationNotifier {
|
||||
// eslint-disable-next-line unicorn/no-null
|
||||
private listener: PAIAAuthorizationListener | null = null;
|
||||
|
||||
setAuthorizationListener(listener: PAIAAuthorizationListener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
/**
|
||||
* The authorization complete callback.
|
||||
*/
|
||||
onAuthorizationComplete(
|
||||
request: AuthorizationRequest,
|
||||
response: PAIAAuthorizationResponse | null,
|
||||
error: AuthorizationError | null,
|
||||
): void {
|
||||
if (this.listener) {
|
||||
// complete authorization request
|
||||
this.listener(request, response, error);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface PAIAAuthorizationResponseJson {
|
||||
code: string;
|
||||
state: string;
|
||||
patron: string;
|
||||
}
|
||||
|
||||
export class PAIAAuthorizationResponse {
|
||||
code: string;
|
||||
|
||||
state: string;
|
||||
|
||||
patron: string;
|
||||
|
||||
constructor(response: PAIAAuthorizationResponseJson) {
|
||||
this.code = response.code;
|
||||
this.state = response.state;
|
||||
this.patron = response.patron;
|
||||
}
|
||||
|
||||
toJson(): PAIAAuthorizationResponseJson {
|
||||
return {code: this.code, state: this.state, patron: this.patron};
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {StringMap} from '@openid/appauth';
|
||||
|
||||
// TODO: add documentation
|
||||
export interface PAIATokenRequestJson {
|
||||
code: string;
|
||||
patron: string;
|
||||
extras?: StringMap;
|
||||
}
|
||||
|
||||
export class PAIATokenRequest {
|
||||
code: string;
|
||||
|
||||
patron: string;
|
||||
|
||||
extras?: StringMap;
|
||||
|
||||
constructor(request: PAIATokenRequestJson) {
|
||||
this.code = request.code;
|
||||
this.patron = request.patron;
|
||||
this.extras = request.extras;
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes a TokenRequest to a JavaScript object.
|
||||
*/
|
||||
toJson(): PAIATokenRequestJson {
|
||||
return {
|
||||
code: this.code,
|
||||
patron: this.patron,
|
||||
extras: this.extras,
|
||||
};
|
||||
}
|
||||
|
||||
toStringMap(): StringMap {
|
||||
const map: StringMap = {
|
||||
patron: this.patron,
|
||||
code: this.code,
|
||||
};
|
||||
|
||||
// copy over extras
|
||||
if (this.extras) {
|
||||
for (const extra in this.extras) {
|
||||
if (this.extras.hasOwnProperty(extra) && !map.hasOwnProperty(extra)) {
|
||||
// check before inserting to requestMap
|
||||
map[extra] = this.extras[extra];
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {TokenResponse, TokenResponseJson} from '@openid/appauth';
|
||||
import {nowInSeconds} from '@openid/appauth';
|
||||
|
||||
const AUTH_EXPIRY_BUFFER = 10 * 60 * -1; // 10 mins in seconds
|
||||
|
||||
export interface PAIATokenResponseJson extends TokenResponseJson {
|
||||
patron: string;
|
||||
}
|
||||
|
||||
export class PAIATokenResponse extends TokenResponse {
|
||||
patron: string;
|
||||
|
||||
constructor(response: PAIATokenResponseJson) {
|
||||
super(response);
|
||||
this.patron = response.patron;
|
||||
}
|
||||
|
||||
toJson(): PAIATokenResponseJson {
|
||||
return {
|
||||
access_token: this.accessToken,
|
||||
id_token: this.idToken,
|
||||
refresh_token: this.refreshToken,
|
||||
scope: this.scope,
|
||||
token_type: this.tokenType,
|
||||
issued_at: this.issuedAt,
|
||||
expires_in: this.expiresIn?.toString(),
|
||||
patron: this.patron,
|
||||
};
|
||||
}
|
||||
|
||||
isValid(buffer: number = AUTH_EXPIRY_BUFFER): boolean {
|
||||
if (this.expiresIn) {
|
||||
const now = nowInSeconds();
|
||||
return now < this.issuedAt + this.expiresIn + buffer;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {AuthorizationServiceConfiguration, Requestor} from '@openid/appauth';
|
||||
import {PAIATokenResponse} from './paia-token-response';
|
||||
|
||||
export interface UserInfoHandler {
|
||||
performUserInfoRequest(
|
||||
configuration: AuthorizationServiceConfiguration,
|
||||
token: PAIATokenResponse,
|
||||
): Promise<unknown>;
|
||||
}
|
||||
|
||||
export class PAIAUserInfoHandler implements UserInfoHandler {
|
||||
constructor(private requestor: Requestor) {}
|
||||
|
||||
public async performUserInfoRequest(
|
||||
configuration: AuthorizationServiceConfiguration,
|
||||
token: PAIATokenResponse,
|
||||
): Promise<unknown> {
|
||||
const settings: JQueryAjaxSettings = {
|
||||
url: `${configuration.userInfoEndpoint}/${token.patron}`,
|
||||
method: 'GET',
|
||||
headers: {
|
||||
Authorization: `${token.tokenType == 'bearer' ? 'Bearer' : token.tokenType} ${token.accessToken}`,
|
||||
},
|
||||
};
|
||||
|
||||
return this.requestor.xhr(settings);
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {
|
||||
TokenErrorJson,
|
||||
AuthorizationServiceConfiguration,
|
||||
RevokeTokenRequest,
|
||||
Requestor,
|
||||
JQueryRequestor,
|
||||
BasicQueryStringUtils,
|
||||
QueryStringUtils,
|
||||
AppAuthError,
|
||||
TokenError,
|
||||
} from '@openid/appauth';
|
||||
import {PAIATokenRequest} from './paia-token-request';
|
||||
import {PAIATokenResponse, PAIATokenResponseJson} from './paia-token-response';
|
||||
|
||||
export class PAIATokenRequestHandler {
|
||||
constructor(
|
||||
public readonly requestor: Requestor = new JQueryRequestor(),
|
||||
public readonly utils: QueryStringUtils = new BasicQueryStringUtils(),
|
||||
) {}
|
||||
|
||||
private isTokenResponse(
|
||||
response: PAIATokenResponseJson | TokenErrorJson,
|
||||
): response is PAIATokenResponseJson {
|
||||
return (response as TokenErrorJson).error === undefined;
|
||||
}
|
||||
|
||||
performRevokeTokenRequest(
|
||||
configuration: AuthorizationServiceConfiguration,
|
||||
request: RevokeTokenRequest,
|
||||
): Promise<boolean> {
|
||||
const revokeTokenResponse = this.requestor.xhr<boolean>({
|
||||
url: configuration.revocationEndpoint,
|
||||
method: 'GET',
|
||||
// headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||
data: this.utils.stringify(request.toStringMap()),
|
||||
});
|
||||
|
||||
return revokeTokenResponse.then(_response => {
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
performTokenRequest(
|
||||
configuration: AuthorizationServiceConfiguration,
|
||||
request: PAIATokenRequest,
|
||||
): Promise<PAIATokenResponse> {
|
||||
const tokenResponse = this.requestor.xhr<PAIATokenResponseJson | TokenErrorJson>({
|
||||
url: configuration.tokenEndpoint,
|
||||
method: 'POST',
|
||||
data: {
|
||||
patron: request.patron,
|
||||
grant_type: 'authorization_code',
|
||||
...request.toStringMap(),
|
||||
},
|
||||
headers: {
|
||||
'Authorization': `Basic ${request.code}`,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
});
|
||||
|
||||
return tokenResponse.then(response => {
|
||||
return this.isTokenResponse(response)
|
||||
? new PAIATokenResponse(response)
|
||||
: Promise.reject<PAIATokenResponse>(new AppAuthError(response.error, new TokenError(response)));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface IUserInfo {
|
||||
display_name: string;
|
||||
role: string;
|
||||
email: string;
|
||||
user_name: string;
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<div #schedule class="schedule">
|
||||
<a [routerLink]="['/schedule/week-overview']">
|
||||
<a [routerLink]="['/schedule/weekly-view']">
|
||||
<ion-icon [size]="36" [weight]="300" name="calendar_month"></ion-icon>
|
||||
<ion-label [innerHTML]="'schedule.recurring' | translate"></ion-label>
|
||||
</a>
|
||||
|
||||
@@ -127,6 +127,7 @@ export class AddEventActionChipComponent {
|
||||
.filter(it => it.selected)
|
||||
.map(it => it.item),
|
||||
},
|
||||
mode: 'md', // TODO Remove if Issue 239 is solved.
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
@@ -36,7 +36,7 @@ export class ChipFilterComponent {
|
||||
/**
|
||||
* Emits when the chip has been activated/deactivated
|
||||
*/
|
||||
@Output() toggle = new EventEmitter<unknown>();
|
||||
@Output() toggled = new EventEmitter<unknown>();
|
||||
|
||||
/**
|
||||
* Value to emit when chip has been activated/deactivated
|
||||
@@ -47,6 +47,6 @@ export class ChipFilterComponent {
|
||||
* Signalize that the chip filter has been activated/deactivated
|
||||
*/
|
||||
emitToggle(value: unknown) {
|
||||
this.toggle.emit(value);
|
||||
this.toggled.emit(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,10 +114,6 @@ import {SkeletonListComponent} from './list/skeleton-list.component';
|
||||
import {TreeListFragmentComponent} from './list/tree-list-fragment.component';
|
||||
import {TreeListComponent} from './list/tree-list.component';
|
||||
import {StAppsWebHttpClient} from './stapps-web-http-client.provider';
|
||||
import {ArticleDetailContentComponent} from './types/article/article-detail-content.component';
|
||||
import {ArticleListItemComponent} from './types/article/article-item.component';
|
||||
import {BookDetailContentComponent} from './types/book/book-detail-content.component';
|
||||
import {BookListItemComponent} from './types/book/book-list-item.component';
|
||||
import {CatalogDetailContentComponent} from './types/catalog/catalog-detail-content.component';
|
||||
import {CatalogListItemComponent} from './types/catalog/catalog-list-item.component';
|
||||
import {DateSeriesDetailContentComponent} from './types/date-series/date-series-detail-content.component';
|
||||
@@ -136,8 +132,6 @@ import {MessageDetailContentComponent} from './types/message/message-detail-cont
|
||||
import {MessageListItemComponent} from './types/message/message-list-item.component';
|
||||
import {OrganizationDetailContentComponent} from './types/organization/organization-detail-content.component';
|
||||
import {OrganizationListItemComponent} from './types/organization/organization-list-item.component';
|
||||
import {PeriodicalDetailContentComponent} from './types/periodical/periodical-detail-content.component';
|
||||
import {PeriodicalListItemComponent} from './types/periodical/periodical-list-item.component';
|
||||
import {PersonDetailContentComponent} from './types/person/person-detail-content.component';
|
||||
import {PersonListItemComponent} from './types/person/person-list-item.component';
|
||||
import {PlaceDetailContentComponent} from './types/place/place-detail-content.component';
|
||||
@@ -216,12 +210,6 @@ import {IonIconDirective} from 'src/app/util/ion-icon/ion-icon.directive';
|
||||
SimpleDataListComponent,
|
||||
TitleCardComponent,
|
||||
ExternalLinkComponent,
|
||||
ArticleListItemComponent,
|
||||
ArticleDetailContentComponent,
|
||||
BookListItemComponent,
|
||||
BookDetailContentComponent,
|
||||
PeriodicalListItemComponent,
|
||||
PeriodicalDetailContentComponent,
|
||||
ShareButtonComponent,
|
||||
],
|
||||
exports: [
|
||||
@@ -241,9 +229,6 @@ import {IonIconDirective} from 'src/app/util/ion-icon/ion-icon.directive';
|
||||
FavoriteButtonComponent,
|
||||
TreeListComponent,
|
||||
ExternalLinkComponent,
|
||||
ArticleDetailContentComponent,
|
||||
BookDetailContentComponent,
|
||||
PeriodicalDetailContentComponent,
|
||||
TitleCardComponent,
|
||||
],
|
||||
imports: [
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
<ng-template #defaultContent>
|
||||
<div class="content-switch">
|
||||
@switch (item.type) {
|
||||
@case ('article') {
|
||||
<stapps-article-detail-content [item]="$any(item)"></stapps-article-detail-content>
|
||||
}
|
||||
@case ('catalog') {
|
||||
<stapps-catalog-detail-content [item]="$any(item)"></stapps-catalog-detail-content>
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
[size]="24"
|
||||
[fill]="(isFavorite$ | async) || false"
|
||||
[class.selected]="isFavorite$ | async"
|
||||
name="grade"
|
||||
name="star"
|
||||
></ion-icon>
|
||||
</ion-button>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
slot="icon-only"
|
||||
[size]="32"
|
||||
color="medium"
|
||||
name="grade"
|
||||
name="star"
|
||||
></ion-icon>
|
||||
}
|
||||
<label class="thank-you">{{ 'ratings.thank_you' | translate }}</label>
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
*/
|
||||
import {ComponentRef, Directive, Input, Type, ViewContainerRef} from '@angular/core';
|
||||
import {SCThings, SCThingType} from '@openstapps/core';
|
||||
import {BookListItemComponent} from '../types/book/book-list-item.component';
|
||||
import {CatalogListItemComponent} from '../types/catalog/catalog-list-item.component';
|
||||
import {DateSeriesListItemComponent} from '../types/date-series/date-series-list-item.component';
|
||||
import {EventListItemComponent} from '../types/event/event-list-item.component';
|
||||
@@ -25,9 +24,7 @@ import {PersonListItemComponent} from '../types/person/person-list-item.componen
|
||||
import {PlaceListItemComponent} from '../types/place/place-list-item.component';
|
||||
import {SemesterListItemComponent} from '../types/semester/semester-list-item.component';
|
||||
import {VideoListItemComponent} from '../types/video/video-list-item.component';
|
||||
import {PeriodicalListItemComponent} from '../types/periodical/periodical-list-item.component';
|
||||
import {DataListItemHostDefaultComponent} from './data-list-item-host-default.component';
|
||||
import {ArticleListItemComponent} from '../types/article/article-item.component';
|
||||
import {DishListItemComponent} from '../types/dish/dish-list-item.component';
|
||||
import {JobPostingListItemComponent} from '../types/job-posting/job-posting-list-item.component';
|
||||
|
||||
@@ -51,9 +48,6 @@ const DataListItemIndex: Partial<Record<SCThingType, Type<DataListItem>>> = {
|
||||
[SCThingType.Room]: PlaceListItemComponent,
|
||||
[SCThingType.Semester]: SemesterListItemComponent,
|
||||
[SCThingType.Video]: VideoListItemComponent,
|
||||
[SCThingType.Periodical]: PeriodicalListItemComponent,
|
||||
[SCThingType.Book]: BookListItemComponent,
|
||||
[SCThingType.Article]: ArticleListItemComponent,
|
||||
[SCThingType.JobPosting]: JobPostingListItemComponent,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<stapps-search-page
|
||||
[title]="'canteens.title' | translate"
|
||||
[navigation]="[]"
|
||||
[showDefaultData]="true"
|
||||
[forcedFilter]="forcedFilter"
|
||||
>
|
||||
|
||||
@@ -15,16 +15,14 @@
|
||||
import {Component, DestroyRef, inject, Input, OnInit} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Keyboard} from '@capacitor/keyboard';
|
||||
import {AlertController, AnimationBuilder, AnimationController} from '@ionic/angular/standalone';
|
||||
import {Capacitor} from '@capacitor/core';
|
||||
import {
|
||||
SCFacet,
|
||||
SCFeatureConfiguration,
|
||||
SCSearchFilter,
|
||||
SCSearchQuery,
|
||||
SCSearchSort,
|
||||
SCThings,
|
||||
} from '@openstapps/core';
|
||||
AlertController,
|
||||
AnimationBuilder,
|
||||
AnimationController,
|
||||
ModalController,
|
||||
} from '@ionic/angular/standalone';
|
||||
import {Capacitor} from '@capacitor/core';
|
||||
import {SCFacet, SCSearchFilter, SCSearchQuery, SCSearchSort, SCThings} from '@openstapps/core';
|
||||
import {NGXLogger} from 'ngx-logger';
|
||||
import {combineLatest, Subject} from 'rxjs';
|
||||
import {debounceTime, distinctUntilChanged, startWith} from 'rxjs/operators';
|
||||
@@ -36,6 +34,8 @@ import {PositionService} from '../../map/position.service';
|
||||
import {ConfigProvider} from '../../config/config.provider';
|
||||
import {searchPageSwitchAnimation} from './search-page-switch-animation';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
import {ContextMenuModalComponent} from '../../menu/context/context-menu-modal.component';
|
||||
import {enterAnimation, leaveAnimation} from '../../menu/context/context-menu-modal.animations';
|
||||
|
||||
/**
|
||||
* SearchPageComponent queries things and shows list of things as search results and filter as context menu
|
||||
@@ -60,14 +60,6 @@ export class SearchPageComponent implements OnInit {
|
||||
*/
|
||||
loading = false;
|
||||
|
||||
/**
|
||||
* Navigation elements between search pages
|
||||
*/
|
||||
@Input() navigation: Array<{label: string; routerLink?: string[]}> = [
|
||||
{label: 'search.type'},
|
||||
{label: 'hebisSearch.type', routerLink: ['/hebis-search']},
|
||||
];
|
||||
|
||||
/**
|
||||
* Show default data (e.g. when there is user interaction)
|
||||
*/
|
||||
@@ -173,7 +165,8 @@ export class SearchPageComponent implements OnInit {
|
||||
private readonly route: ActivatedRoute,
|
||||
protected positionService: PositionService,
|
||||
private readonly configProvider: ConfigProvider,
|
||||
animationController: AnimationController,
|
||||
protected animationController: AnimationController,
|
||||
protected modalController: ModalController,
|
||||
) {
|
||||
this.routeAnimation = searchPageSwitchAnimation(animationController);
|
||||
}
|
||||
@@ -345,17 +338,6 @@ export class SearchPageComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
try {
|
||||
// TODO: make this hack more generic
|
||||
if (this.navigation[1]?.routerLink?.[0] === '/hebis-search') {
|
||||
const features = this.configProvider.getValue('features') as SCFeatureConfiguration;
|
||||
if (features.plugins?.['hebis-plugin']?.urlPath === undefined) {
|
||||
this.navigation = [];
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
this.logger.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -368,4 +350,21 @@ export class SearchPageComponent implements OnInit {
|
||||
this.searchStringChanged(term);
|
||||
}
|
||||
}
|
||||
|
||||
async openContextMenu(): Promise<void> {
|
||||
const modal = await this.modalController.create({
|
||||
component: ContextMenuModalComponent,
|
||||
cssClass: 'context-menu-modal',
|
||||
showBackdrop: true,
|
||||
backdropDismiss: true,
|
||||
mode: 'md', // TODO has to be fixed to md for now. ios mode is unresponsive. Remove if Issue 239 is solved
|
||||
enterAnimation: (baseElement: HTMLElement) => enterAnimation(baseElement, this.animationController),
|
||||
leaveAnimation: (baseElement: HTMLElement) => leaveAnimation(baseElement, this.animationController),
|
||||
componentProps: {
|
||||
contextMenuService: this.contextMenuService,
|
||||
},
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
@if (showContextMenu) {
|
||||
<stapps-context contentId="data-list"></stapps-context>
|
||||
}
|
||||
<ion-header>
|
||||
@if (showDrawer && showTopToolbar) {
|
||||
<ion-toolbar color="primary" mode="ios">
|
||||
@@ -41,31 +37,12 @@
|
||||
>
|
||||
</ion-searchbar>
|
||||
@if (showContextMenu) {
|
||||
<ion-menu-button menu="context" auto-hide="false" slot="end">
|
||||
<!-- TODO has to be fixed to md for now. ios mode displays broken/missing icon -->
|
||||
<ion-menu-button mode="md" menu="context" auto-hide="false" slot="end" (click)="openContextMenu()">
|
||||
<ion-icon name="tune"></ion-icon>
|
||||
</ion-menu-button>
|
||||
}
|
||||
</ion-toolbar>
|
||||
@if (navigation.length > 0) {
|
||||
<ion-toolbar color="primary" class="category-tab">
|
||||
<ion-buttons class="ion-justify-content-between">
|
||||
@for (target of navigation; track target) {
|
||||
@if (target.routerLink) {
|
||||
<ion-button
|
||||
[routerLink]="target.routerLink"
|
||||
queryParamsHandling="merge"
|
||||
[routerAnimation]="routeAnimation"
|
||||
fill="outline"
|
||||
size="large"
|
||||
>{{ target.label | translate }}
|
||||
</ion-button>
|
||||
} @else {
|
||||
<ion-button class="button-active" size="large">{{ target.label | translate }}</ion-button>
|
||||
}
|
||||
}
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
}
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="content">
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user