Merge branch 'main' into develop
# Conflicts: # .env.production # entrypoint.sh # src/views/MainView.vue
This commit is contained in:
commit
1f8c3ac144
4 changed files with 8 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ VITE_CLIENTID_KEYCLOAK=VITE_CLIENTID_KEYCLOAK
|
|||
VITE_URL_KEYCLOAK=VITE_URL_KEYCLOAK
|
||||
VITE_API_URI_CONFIG=VITE_API_URI_CONFIG
|
||||
VITE_CLIENTSECRET_KEYCLOAK: VITE_CLIENTSECRET_KEYCLOAK
|
||||
VITE_URL_SSO: VITE_URL_SSO
|
||||
|
||||
# VITE_REALM_KEYCLOAK: "bma-ehr"
|
||||
# VITE_CLIENTID_KEYCLOAK: "bma-ehr-exam-vue3"
|
||||
|
|
|
|||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -22,4 +22,5 @@ pnpm-debug.log*
|
|||
*.sln
|
||||
*.sw?
|
||||
|
||||
package-lock.json
|
||||
package-lock.json
|
||||
.env
|
||||
|
|
@ -13,6 +13,7 @@ do
|
|||
sed -i 's|VITE_URL_KEYCLOAK|'${VITE_URL_KEYCLOAK}'|g' $file
|
||||
sed -i 's|VITE_API_URI_CONFIG|'${VITE_API_URI_CONFIG}'|g' $file
|
||||
sed -i 's|VITE_CLIENTSECRET_KEYCLOAK|'${VITE_CLIENTSECRET_KEYCLOAK}'|g' $file
|
||||
sed -i 's|VITE_URL_SSO|'${VITE_URL_SSO}'|g' $file
|
||||
|
||||
done
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
const ACCESS_TOKEN = 'BMAHRISCKI_KEYCLOAK_IDENTITY'
|
||||
const key_C_Config = {
|
||||
url_Logout: import.meta.env.VITE_URL_SSO,
|
||||
}
|
||||
|
||||
interface AuthResponse {
|
||||
access_token: string
|
||||
|
|
@ -15,7 +18,7 @@ async function setAuthen(r: AuthResponse) {
|
|||
|
||||
async function logout() {
|
||||
await deleteCookie(ACCESS_TOKEN)
|
||||
window.location.href = '/login'
|
||||
window.location.href = key_C_Config.url_Logout
|
||||
}
|
||||
|
||||
async function getToken() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue