From efa7587702b8ed212a081043664053f0e41cfca6 Mon Sep 17 00:00:00 2001 From: Tim Zieger Date: Sat, 16 May 2020 20:25:37 +0200 Subject: [PATCH] login communication --- .../security/JWTAuthenticationFilter.java | 1 + frontend/src/App.vue | 35 ++++++++++++++++--- frontend/src/views/SignIn.vue | 19 ++++++++-- 3 files changed, 49 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/de/hft/geotime/security/JWTAuthenticationFilter.java b/backend/src/main/java/de/hft/geotime/security/JWTAuthenticationFilter.java index e63aa7d..b9cd481 100644 --- a/backend/src/main/java/de/hft/geotime/security/JWTAuthenticationFilter.java +++ b/backend/src/main/java/de/hft/geotime/security/JWTAuthenticationFilter.java @@ -53,6 +53,7 @@ public class JWTAuthenticationFilter extends UsernamePasswordAuthenticationFilte HttpServletResponse res, FilterChain chain, Authentication auth) { + res.setHeader("Access-Control-Expose-Headers", "Authorization"); String token = JWT.create() .withSubject(((User) auth.getPrincipal()).getUsername()) .withExpiresAt(new Date(System.currentTimeMillis() + EXPIRATION_TIME)) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 83a10c2..ab8bd97 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -51,12 +51,13 @@ - + mdi-window-close - + +

@@ -81,7 +82,7 @@ - + @@ -92,7 +93,7 @@