projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
15064: Logging into home cluster logs into all federated clusters
[arvados.git]
/
src
/
services
/
auth-service
/
auth-service.ts
diff --git
a/src/services/auth-service/auth-service.ts
b/src/services/auth-service/auth-service.ts
index eae219dd0ad2a547883b94047a961d10048f5019..cec0cef1d86538a8337bc678a5422a9fec95d1c5 100644
(file)
--- a/
src/services/auth-service/auth-service.ts
+++ b/
src/services/auth-service/auth-service.ts
@@
-108,9
+108,10
@@
export class AuthService {
localStorage.removeItem(USER_PREFS);
}
localStorage.removeItem(USER_PREFS);
}
- public login(uuidPrefix: string, homeCluster: string) {
+ public login(uuidPrefix: string, homeCluster: string
, remoteHosts: { [key: string]: string }
) {
const currentUrl = `${window.location.protocol}//${window.location.host}/token`;
const currentUrl = `${window.location.protocol}//${window.location.host}/token`;
- window.location.assign(`https://${homeCluster}/login?remote=${uuidPrefix}&return_to=${currentUrl}`);
+ const homeClusterHost = remoteHosts[homeCluster];
+ window.location.assign(`https://${homeClusterHost}/login?${uuidPrefix !== homeCluster ? "remote=" + uuidPrefix + "&" : ""}return_to=${currentUrl}`);
}
public logout() {
}
public logout() {