From 75f4b6a17899c739d1ce77ce84dd004e9a52c74e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9F=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=D0=B2=D0=BE=D0=B9?= Date: Tue, 16 May 2023 03:53:59 +0400 Subject: [PATCH] Lab6: JWT server-side is ready. It's frontend turn --- frontend/public/index.html | 1 + frontend/src/App.vue | 64 ++++-- frontend/src/components/Customers.vue | 189 ++++++++---------- frontend/src/components/Login.vue | 61 ++++++ frontend/src/components/Signup.vue | 66 ++++++ frontend/src/main.js | 18 +- .../np/something/Exceptions/JwtException.java | 11 + .../np/something/OpenAPI30Configuration.java | 28 +++ .../java/np/something/WebConfiguration.java | 15 +- .../controllers/CustomerController.java | 29 +++ .../java/np/something/security/JwtFilter.java | 73 +++++++ .../np/something/security/JwtProperties.java | 27 +++ .../np/something/security/JwtProvider.java | 108 ++++++++++ .../security/SecurityConfiguration.java | 47 ++++- .../something/services/CustomerService.java | 33 ++- src/main/resources/templates/customers.html | 20 -- 16 files changed, 624 insertions(+), 166 deletions(-) create mode 100644 frontend/src/components/Login.vue create mode 100644 frontend/src/components/Signup.vue create mode 100644 src/main/java/np/something/Exceptions/JwtException.java create mode 100644 src/main/java/np/something/OpenAPI30Configuration.java create mode 100644 src/main/java/np/something/security/JwtFilter.java create mode 100644 src/main/java/np/something/security/JwtProperties.java create mode 100644 src/main/java/np/something/security/JwtProvider.java diff --git a/frontend/public/index.html b/frontend/public/index.html index 832e6e9..94366f6 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -6,6 +6,7 @@ + Социальная сеть diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 1714cda..dc124e5 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,44 +1,66 @@ diff --git a/frontend/src/components/Customers.vue b/frontend/src/components/Customers.vue index 57a01e3..b10ce11 100644 --- a/frontend/src/components/Customers.vue +++ b/frontend/src/components/Customers.vue @@ -4,15 +4,6 @@

Профили

-
-
-
- -
-
-

Список профилей

@@ -20,20 +11,19 @@
ID: {{ customer['id'] }}
-
Никнейм: {{ customer['username'] }}
-
Пароль: {{ customer['password'] }}
+
Никнейм: {{ customer['username'] }}

Комментарии:

-
+
-
"{{ comment['content'] }}" - к посту '{{ comment['postTitle'] }}' от пользователя {{ comment['postAuthor'] }}
+
"{{ comment['content'] }}" - к посту "{{ comment['postTitle'] }}" от пользователя {{ comment['postAuthor'] }}

Нет комментариев

Посты:

-
+
{{ post['title'] }}
@@ -42,128 +32,115 @@

Нет постов

-
- - +
+ +
- -
- -