diff --git a/client/src/app/admin/admin-auth.guard.ts b/client/src/app/admin/admin-auth.guard.ts index 02ac7a5e6dea1d5f36f8abb33b1a912d2c75d9e5..2658bb975516deac79518857d4d126a3636efdbf 100644 --- a/client/src/app/admin/admin-auth.guard.ts +++ b/client/src/app/admin/admin-auth.guard.ts @@ -9,8 +9,8 @@ import { Injectable } from '@angular/core'; import { CanActivate, Router } from '@angular/router'; -import { Store, select } from '@ngrx/store'; +import { Store, select } from '@ngrx/store'; import { combineLatest, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; diff --git a/client/src/app/auth/init.keycloak.ts b/client/src/app/auth/init.keycloak.ts index a5186253c05dd947ef3c8518fce6652ea60ced12..a15e68f1179781fb93e1a25d10e3c9a35e3e8ed8 100644 --- a/client/src/app/auth/init.keycloak.ts +++ b/client/src/app/auth/init.keycloak.ts @@ -24,6 +24,9 @@ export function initializeKeycloak(keycloak: KeycloakService, store: Store<{ }>, if (event.type === KeycloakEventType.OnAuthSuccess) { store.dispatch(keycloakActions.authSuccess()); } + if (event.type === KeycloakEventType.OnAuthRefreshError) { + store.dispatch(keycloakActions.login()); + } }) let silentCheckSsoRedirectUri = window.location.origin; diff --git a/conf-dev/public_key b/conf-dev/public_key index ebb23d4c7bfdc0bec2e326b8df170f22e3412c5d..7a109409de071d2cc41b153c799ebddb3f142318 100644 --- a/conf-dev/public_key +++ b/conf-dev/public_key @@ -1,3 +1,3 @@ -----BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAi5V9FJj0dI/2TRDWoZzSKDa8l5N81sCQUunZaEuyBx3EW5cDioL2ktdc3LCB5u+rVQzYD6c3b24eLbgwgYx8AQ03GXW63TkuUy7oEA1XtBicNX/IO51ITUCeUJfJpUI+iGDEK4EmeVBiaVUTrQ8L/SMTQUcRPESNwaRmFov9kkNDiPaNQpAzbSillJLdQG9oOIKDpqjXW+ZOBct1J//+8+f0vHibbDt2HacFrq2z2ahv10ESnxqtnzjMMcn0e/IDIiolsQpcCpEwaBBqJ6axUiKReJBXU/IsFn/GtemLwPo/MpthjIi1rfqPvtin25ecR9VAWRW0bLdqztnMsfJ3oQIDAQAB +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/mnnVnoX4yuiq1AXklR//PCcNOLibWzoRcyhGQQ+Rfokcxny0uBrVmFb7xNAxgqaf3hyo0789ONUf41xQF8CO0+YdLmOfQDRegohZP4mRvppCQUozroKphGAvYt90xaFJL/IttXeRKmUk6Noc/3V0oUA+1P8SbdpIq8s+L9yXfqWmW+mjlMAU31/3gVM/Q/dTmKFnkVlwprhy4OoGzHlNaFElIjFOEICL6M3ANTBLoZwDHiwvxqXuyA9IA8LeHuVpxWmaShGA0UxA99cF3edCmkc6R4d1R7rWP0XjnjYEOYDcVhJZJlRamNuYtgnr82sgr/bJahHFxAnF3GlBHs+gwIDAQAB -----END PUBLIC KEY----- diff --git a/server/src/Middleware/AuthorizationMiddleware.php b/server/src/Middleware/AuthorizationMiddleware.php index b17c9aaae73870f3e428a0648a8ecfefeb8df4db..d03a3f459243bff3864772d70d858c037e5f38dc 100644 --- a/server/src/Middleware/AuthorizationMiddleware.php +++ b/server/src/Middleware/AuthorizationMiddleware.php @@ -95,6 +95,6 @@ final class AuthorizationMiddleware implements MiddlewareInterface $resonse->getBody()->write(json_encode(array( 'message' => $message ))); - return $resonse->withStatus(401); + return $resonse->withStatus(401)->withHeader('Access-Control-Allow-Origin', '*'); } } diff --git a/server/src/Middleware/RouteGuardMiddleware.php b/server/src/Middleware/RouteGuardMiddleware.php index 89bcf705156f828afd46505f4999603424b70b45..a9ba0e56e36a9f2578e18d1b145776f245f09642 100644 --- a/server/src/Middleware/RouteGuardMiddleware.php +++ b/server/src/Middleware/RouteGuardMiddleware.php @@ -102,6 +102,6 @@ final class RouteGuardMiddleware implements MiddlewareInterface $resonse->getBody()->write(json_encode(array( 'message' => $message ))); - return $resonse->withStatus($code); + return $resonse->withStatus($code)->withHeader('Access-Control-Allow-Origin', '*'); } }