Skip to content

Commit 7e74354

Browse files
authored
PHRAS-2995_phr-as-auth-idp-BIS (#4180)
* WIP ; allow multiple instances of some auth clients (migrate conf) ; add ps-oauth ; remove google+ * WIP ; fix ps-oauth ; fix tests * WIP ; add api-auth to extra_hosts * WIP ; fix yaml syntax error * WIP ; fix yaml syntax error ; better conf sample * WIP ; add "everyone-group" * WIP ; add the provider-id in session * WIP ; add getOptions() to providers (so phr/expose can filter providers) * WIP ; add auto-logout option so logout from phr also logouts from ps-auth * connect to expose using IDP from connected user * WIP ; auto-logout redirects to phr home * unnecessary session var * unused * fix * catch some error * fix navigation in train thumbnail * update file version * pass params in session to have constant redirect_uri ; add debug * invalidate session --> parade test ok * cleanup
1 parent 2579ee5 commit 7e74354

File tree

43 files changed

+1903
-1141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1903
-1141
lines changed

Phraseanet-production-client/dist/production.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11142,6 +11142,10 @@ var workzone = function workzone(services) {
1114211142
(0, _jquery2.default)('.expose_field_mapping').addClass('hidden');
1114311143
(0, _jquery2.default)('.add_expose_block').addClass('hidden');
1114411144
}
11145+
11146+
if ('error' in data) {
11147+
(0, _jquery2.default)('.publication-list').empty().html(data.error);
11148+
}
1114511149
}
1114611150
});
1114711151
}

Phraseanet-production-client/dist/production.min.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11142,6 +11142,10 @@ var workzone = function workzone(services) {
1114211142
(0, _jquery2.default)('.expose_field_mapping').addClass('hidden');
1114311143
(0, _jquery2.default)('.add_expose_block').addClass('hidden');
1114411144
}
11145+
11146+
if ('error' in data) {
11147+
(0, _jquery2.default)('.publication-list').empty().html(data.error);
11148+
}
1114511149
}
1114611150
});
1114711151
}

Phraseanet-production-client/src/components/ui/workzone/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,10 @@ const workzone = (services) => {
10981098
$('.expose_field_mapping').addClass('hidden');
10991099
$('.add_expose_block').addClass('hidden');
11001100
}
1101+
1102+
if ('error' in data) {
1103+
$('.publication-list').empty().html(data.error);
1104+
}
11011105
}
11021106
});
11031107
}

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@
109109
"php-xpdf/php-xpdf": "~0.2.1",
110110
"exiftool/exiftool": "^11",
111111
"ramsey/uuid": "^3.0",
112-
"roave/security-advisories": "dev-master",
113112
"silex/silex": "^1.3.0",
114113
"silex/web-profiler": "~1.0",
115114
"simple-bus/doctrine-orm-bridge": "^4.0",

composer.lock

Lines changed: 1 addition & 133 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/configuration.sample.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,35 +167,63 @@ authentication:
167167
providers:
168168
facebook:
169169
enabled: false
170+
display: false
171+
title: Facebook
172+
type: facebook
170173
options:
171174
app-id: ''
172175
secret: ''
173176
default-graph-version: 'v2.10'
174177
twitter:
175178
enabled: false
179+
display: false
180+
title: Twitter
181+
type: twitter
176182
options:
177183
consumer-key: ''
178184
consumer-secret: ''
179-
google-plus:
185+
github:
180186
enabled: false
187+
display: false
188+
title: Github
189+
type: github
181190
options:
182191
client-id: ''
183192
client-secret: ''
184-
github:
193+
viadeo:
185194
enabled: false
195+
display: false
196+
title: Viadeo
197+
type: viadeo
186198
options:
187199
client-id: ''
188200
client-secret: ''
189-
viadeo:
201+
linkedin:
190202
enabled: false
203+
display: false
204+
title: LinkedIN
205+
type: linkedin
191206
options:
192207
client-id: ''
193208
client-secret: ''
194-
linkedin:
209+
ps_auth_1:
195210
enabled: false
211+
display: false
212+
title: 'PS Auth 1'
213+
type: 'ps-auth'
196214
options:
197215
client-id: ''
198216
client-secret: ''
217+
base-url: 'https://api-auth.phrasea.local'
218+
provider-type: 'oauth'
219+
provider-name: 'v2'
220+
icon-uri: null
221+
birth-group: '_firstlog'
222+
everyone-group: '_everyone'
223+
metamodel: '_metamodel'
224+
model-gpfx: '_M_'
225+
model-upfx: '_U_'
226+
auto-logout: false
199227
registration-fields:
200228
-
201229
name: company

docker-compose.under-phrasea.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@ services:
1818

1919
phraseanet:
2020
extra_hosts:
21+
- api-auth.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}
2122
- api-databox.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}
23+
- api-expose.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}
2224
- api-uploader.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}
2325
- databox-indexer.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}
2426
- minio.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}
2527
- phraseanet.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}
2628

2729
worker:
2830
extra_hosts:
31+
- api-auth.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}
2932
- api-databox.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}
33+
- api-expose.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}
3034
- api-uploader.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}
3135
- databox-indexer.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}
3236
- minio.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP}

0 commit comments

Comments
 (0)