Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: AUTHROITY=>AUTHORITY #72

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.DS_Store
*.code-workspace
Authorization/bin/
DICOMwebProxy/bin/
Zipper/bin/
2 changes: 1 addition & 1 deletion UI/.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VUE_APP_URL_API=https://demo.kheops.online/api
VUE_APP_URL_VIEWER=https://ohif.kheops.online/viewer
VUE_APP_URL_VIEWER_SM=https://reportprovider.kheops.online/wsi-viewer
VUE_APP_AUTHROITY=https://keycloak.kheops.online/auth/realms/demo
VUE_APP_AUTHORITY=https://keycloak.kheops.online/auth/realms/demo
VUE_APP_CLIENTID=loginConnect
VUE_APP_URL_ROOT=http://localhost:8080
VUE_APP_USER_MANAGEMENT=https://keycloak.kheops.online/auth/realms/demo/account
2 changes: 1 addition & 1 deletion UI/.env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ VUE_APP_URL_API=%{kheops_api_url}
VUE_APP_URL_VIEWER=%{kheops_ui_viewer_url}
VUE_APP_URL_VIEWER_SM=%{kheops_ui_viewer_sm_url}
VUE_APP_DISABLE_UPLOAD=%{kheops_ui_disable_upload}
VUE_APP_AUTHROITY=%{kheops_ui_authority}
VUE_APP_AUTHORITY=%{kheops_ui_authority}
VUE_APP_CLIENTID=%{kheops_ui_clientid}
VUE_APP_ADDITIONAL_OIDC_OPTIONS=%{kheops_ui_additional_oidc_options}
VUE_APP_URL_ROOT=%{kheops_ui_root_url}
Expand Down
14 changes: 6 additions & 8 deletions UI/src/components/oidc/OidcInitiateLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,25 @@
</template>

<script>
import { mapActions } from 'vuex';
import Loading from '@/components/globalloading/Loading';
import { mapActions } from "vuex";
import Loading from "@/components/globalloading/Loading";

export default {
name: 'OidcInitiateLogin',
name: "OidcInitiateLogin",
components: { Loading },
mounted() {
const payload = {
redirectPath: this.$route.query.target_link_uri,
login_hint: this.$route.query.login_hint,
};
if (process.env.VUE_APP_AUTHROITY === this.$route.query.iss) {
if (process.env.VUE_APP_AUTHORITY === this.$route.query.iss) {
this.authenticateOidc(payload);
} else {
this.$snotify.error(this.$t('sorryerror'));
this.$snotify.error(this.$t("sorryerror"));
}
},
methods: {
...mapActions('oidcStore', [
'authenticateOidc',
]),
...mapActions("oidcStore", ["authenticateOidc"]),
},
};
</script>
23 changes: 14 additions & 9 deletions UI/src/config/oidc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
// eslint-disable-next-line import/prefer-default-export
export const oidcSettings = {
authority: process.env.VUE_APP_AUTHROITY,
clientId: process.env.VUE_APP_CLIENTID,
redirectUri: `${process.env.VUE_APP_URL_ROOT}/oidc-callback`,
responseType: 'code',
automaticSilentRenew: true,
silentRedirectUri: `${process.env.VUE_APP_URL_ROOT}/silent-renew-oidc.html`,
post_logout_redirect_uri: process.env.VUE_APP_URL_ROOT,
scope: 'openid',
...(JSON.parse(process.env.VUE_APP_ADDITIONAL_OIDC_OPTIONS !== undefined && process.env.VUE_APP_ADDITIONAL_OIDC_OPTIONS.length !== 0 ? process.env.VUE_APP_ADDITIONAL_OIDC_OPTIONS : '{}')),
authority: process.env.VUE_APP_AUTHORITY,
clientId: process.env.VUE_APP_CLIENTID,
redirectUri: `${process.env.VUE_APP_URL_ROOT}/oidc-callback`,
responseType: "code",
automaticSilentRenew: true,
silentRedirectUri: `${process.env.VUE_APP_URL_ROOT}/silent-renew-oidc.html`,
post_logout_redirect_uri: process.env.VUE_APP_URL_ROOT,
scope: "openid",
...JSON.parse(
process.env.VUE_APP_ADDITIONAL_OIDC_OPTIONS !== undefined &&
process.env.VUE_APP_ADDITIONAL_OIDC_OPTIONS.length !== 0
? process.env.VUE_APP_ADDITIONAL_OIDC_OPTIONS
: "{}"
),
};
Loading