Skip to content

Commit 0df39c2

Browse files
kofzeraHejdaJakub
authored andcommitted
feat(profile): consolidator config uses full url
* Changed the consolidator_base_url property to consolidator_url, which now includes the full url, thus no fed/cert rerouting is done in code. BREAKING CHANGE: The consolidator_base_url config property needs to be changed to consolidator_url and include the complete url.
1 parent 1df1e65 commit 0df39c2

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

apps/user-profile/src/app/pages/identities-page/identities-page.component.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,8 @@ export class IdentitiesPageComponent implements OnInit {
143143
});
144144
} else {
145145
this.registrarManagerService.getConsolidatorToken().subscribe((token) => {
146-
const type = this.storage.getPerunPrincipal().extSourceType;
147-
const consolidatorBaseUrl = this.storage.getProperty('consolidator_base_url');
148-
window.location.href = `${consolidatorBaseUrl}${
149-
type?.endsWith('X509') ? 'cert' : 'fed'
150-
}-ic/ic/?target_url=${window.location.href}&token=${token}`;
146+
const consolidatorUrl = this.storage.getProperty('consolidator_url');
147+
window.location.href = `${consolidatorUrl}?target_url=${window.location.href}&token=${token}`;
151148
});
152149
}
153150
}

apps/user-profile/src/assets/config/defaultConfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"urn:perun:user:attribute-def:def:login-namespace:egi-ui",
2929
"urn:perun:user:attribute-def:def:login-namespace:sitola"
3030
],
31-
"consolidator_base_url": "https://perun-dev.cesnet.cz/",
31+
"consolidator_url": "https://perun-dev.cesnet.cz/cert-ic/ic/",
3232
"registrar_base_url": "https://perun-dev.cesnet.cz/fed/registrar/",
3333
"use_localhost_linker_url": false,
3434
"password_help": {

libs/perun/models/src/lib/ConfigProperties.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export interface PerunConfig {
186186
// User profile specific
187187
// Required
188188
displayed_tabs: string[];
189-
consolidator_base_url: string;
189+
consolidator_url: string;
190190
registrar_base_url: string;
191191
mfa: ProfileMFA;
192192
preferred_unix_group_names: string[];

0 commit comments

Comments
 (0)