diff --git a/patches/@strapi+plugin-users-permissions+4.25.8.patch b/patches/@strapi+plugin-users-permissions+4.25.8.patch deleted file mode 100644 index 6832b3a..0000000 --- a/patches/@strapi+plugin-users-permissions+4.25.8.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/node_modules/@strapi/plugin-users-permissions/server/bootstrap/grant-config.js b/node_modules/@strapi/plugin-users-permissions/server/bootstrap/grant-config.js -index 013e92c..720ce69 100644 ---- a/node_modules/@strapi/plugin-users-permissions/server/bootstrap/grant-config.js -+++ b/node_modules/@strapi/plugin-users-permissions/server/bootstrap/grant-config.js -@@ -137,4 +137,12 @@ module.exports = (baseURL) => ({ - callback: `${baseURL}/keycloak/callback`, - scope: ['openid', 'email', 'profile'], - }, -+ trompette: { -+ enabled: true, -+ icon: '', -+ key: '', -+ secret: '', -+ callback: `${baseURL}/trompette/callback`, -+ scope:['openid', 'email', 'profile'] -+ } - }); -diff --git a/node_modules/@strapi/plugin-users-permissions/server/services/providers-registry.js b/node_modules/@strapi/plugin-users-permissions/server/services/providers-registry.js -index a559971..d0c508d 100644 ---- a/node_modules/@strapi/plugin-users-permissions/server/services/providers-registry.js -+++ b/node_modules/@strapi/plugin-users-permissions/server/services/providers-registry.js -@@ -347,6 +347,21 @@ const getInitialProviders = ({ purest }) => ({ - }; - }); - }, -+ async trompette({ accessToken }) { -+ const trompette = purest({ provider: 'trompette' }); -+ //const { body: userBody } = await trompette.get('user').auth(accessToken).request(); -+ -+ return keycloak -+ .get('user') -+ .auth(accessToken) -+ .request() -+ .then(({ body }) => { -+ return { -+ username: body.preferred_username, -+ email: body.email, -+ }; -+ }); -+ } - }); - - module.exports = () => { -@@ -373,3 +388,4 @@ module.exports = () => { - }, - }; - }; -+ diff --git a/patches/grant+5.4.22.patch b/patches/grant+5.4.22.patch deleted file mode 100644 index 8a1653c..0000000 --- a/patches/grant+5.4.22.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/node_modules/grant/config/oauth.json b/node_modules/grant/config/oauth.json -index 54afd00..4a2ba1e 100644 ---- a/node_modules/grant/config/oauth.json -+++ b/node_modules/grant/config/oauth.json -@@ -1179,5 +1179,11 @@ - "access_url": "https://zoom.us/oauth/token", - "oauth": 2, - "scope_delimiter": " " -- } -+ }, -+ "trompette": { -+ "authorize_url": "https://trompette.espace120.fr/oauth/v2/authorize", -+ "access_url": "https://trompette.espace120.fr/oauth/v2/token", -+ "oauth": 2, -+ "scope_delimiter": " " -+ } - } -diff --git a/node_modules/grant/config/profile.json b/node_modules/grant/config/profile.json -index c5956c1..e9fe3f5 100644 ---- a/node_modules/grant/config/profile.json -+++ b/node_modules/grant/config/profile.json -@@ -634,5 +634,8 @@ - }, - "zoom": { - "profile_url": "https://api.zoom.us/v2/users/me" -- } -+ }, -+ "trompette": { -+ "profile_url": "https://trompette.espace120.fr/oidc/v1/userinfo" -+ } - } diff --git a/patches/purest+4.0.2.patch b/patches/purest+4.0.2.patch deleted file mode 100644 index 147a7a0..0000000 --- a/patches/purest+4.0.2.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/node_modules/purest/config/providers.json b/node_modules/purest/config/providers.json -index 8dd1dae..d0e5784 100644 ---- a/node_modules/purest/config/providers.json -+++ b/node_modules/purest/config/providers.json -@@ -2784,5 +2784,19 @@ - "authorization": "Bearer {auth}" - } - } -+ }, -+ "trompette": { -+ "default": { -+ "origin": "", -+ "path": "", -+ "headers": { -+ "authorization": "Bearer {auth}" -+ } -+ }, -+ "oauth": { -+ "origin": "https://trompette.espace120.fr", -+ "path": "oauth/{version}/{path}", -+ "version": "v2" -+ } - } - }