From abad2cec96cf5db6eae13f18649897d077108c1d Mon Sep 17 00:00:00 2001 From: qpismont Date: Sun, 26 May 2024 23:36:44 +0200 Subject: [PATCH] add middleware --- bun.lockb | Bin 277508 -> 281962 bytes package.json | 50 +++++++++---------- src/components/forms/LoginForm.tsx | 66 +++++++++++++++++++++---- src/components/forms/LoginFormData.tsx | 22 +++++++++ src/env.d.ts | 10 ++++ src/layouts/HomeLayout.astro | 25 ++++++++++ src/middleware.ts | 29 +++++++++++ src/pages/home/index.astro | 9 ++++ src/pages/index.astro | 10 ++-- src/pages/login.astro | 9 ---- 10 files changed, 181 insertions(+), 49 deletions(-) create mode 100644 src/components/forms/LoginFormData.tsx create mode 100644 src/layouts/HomeLayout.astro create mode 100644 src/middleware.ts create mode 100644 src/pages/home/index.astro delete mode 100644 src/pages/login.astro diff --git a/bun.lockb b/bun.lockb index 58f2b5de48187031fabb67aac80044d22b696b5e..5491c44aba2cc84461918350e75a0cf6827baa75 100755 GIT binary patch delta 24909 zcmeIacUV(f_br_4od{78P^qGT6%-H<2t^{OSP^@#fGDEa3l;?I9xHBjVZ(}I1FT@B zhy_K&iVdvTd&Pp@F_Rs@^Pcnj?sxBV|9kT=7;BEz=Bj%o+1YbS3|_1?T<&12KVasl z%lW@gy>LieU-wL{(!}~rr+;2>^i*C>>$umgY&+fdmr3Y#I<~hZ=X7FUM07RtJsl;I z$`VQRqE!-!0XR4`aMVbo>9|_p^c`Fut&m8pAwT3a(P0xpCIlloK29PrgYLUVA~6Ba zhfVwnwviC2-y~}PI*Ft@lx^T@;JIK+aOeh!q!u`5twdr09txdmxE?Q&D8N$#M~xaW zVWK1lc2!EZQ6e!0qu#(#fkQ)%!`6eH2(AfU52kdxk-iRi4H)&-iSCSojUfC+MW*0l zusJ0J*AX@t)bsqcRU$Ej;)4cJ5zb(8wMK%*mEYSmRk&`~RH+BHLHyGM;k!YdZtW8_ z*;aw8K%N*l-hS8wv}&g&dr;u`5c@F`Bx**)go)!r0>dLD7Z6YBjdy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ZrA_v4&A`bKgt^S72^0>$5~ci^qk{y_Jm|g0jm`%l<*($V_hivNl}=s(@zMJ zd1~KGR&UAGB^_Vi2tuW9ShW~K=`C$>(@NG))a_m+@OR43lWcK+Tt~I816^ZG;^Uf<`{V1>YJ#!Atn@m`gusiyw>L&JZ+ zi0vGJ4tZI`ZlMfI?VH*h%Trojh(5)`lR|X$=60N7sbT1<)2Em-Nli{u-nfXB421pk zBwP9iWL7czHUv`ZFZo$&-*$JkrN#GZsz%d!nYShc4ki9TiJscm->IhE3mJPSvpo$X z1`@-leIee^o~fJe8qEBxj!Hd!&z@m{0}=ntGc1mxkZQHmzB2FN3a@}-gF3V{q!w%9 zb^Ck#tnnbhs9w`^ntkcNcGwD};OCIIzcowS{Qp769X`*j2cy~Am+cMQqrBR1-0;~5 z73V)1oQL=pg7(v1Mi)GIpO`SDxH$2UCMvjhDd#Lkj;xxg& zu6-@xvi$rj#zBTx;Ny;?0M-YF<`qSteeEA-G1@78;B0g}>Y>BPuQvonml{0Rsj1MU zxH{v9iz%f{6^;&{4foD#Z8qRMWo7@UZ@v zfhQhkKmMJPbc#9B#MYL1>oOYv+fw_o!$+La{wgnQAEI48v}ACr@h_Hw_63lyyiDiY zn1y!ZWf%}I?BV|A>@+&S zQv2e>bDrrf4wt;?hx4|x7mYaAseEN5dPw`G#X~#W`dRk!UiaHU`!2@&pWTPut1Ixo zQU zhXnm!Y3j(6PT{;?F>(+(?8T|y?HTn#+w4)N1zX8?+-0!tXemTRF*X+1VdL09$1* zw`c1ed?a+F->n7$irE+BbZ79ZlL=D4CQs%U27y*JIX7uC5G~LY`HTU0?m?H89{?tS5rf@ Yk^Bz69e0qoVkM4p{p^db@)Z{U2bHwb void; +} + +export default function LoginForm(props: LoginFormProps) { + const [form, setForm] = useState({ + username: "", + password: "", + }); + + function handleInputChange(event: React.ChangeEvent) { + const target = event.target; + const name = target.name; + const value = target.value; + + setForm({ + ...form, + [name]: value, + }); + } + + function handleBtnClick() { + props.onSubmit({ ...form }); + } + return (
- +
- +
- -
- -
+
+ +
); diff --git a/src/components/forms/LoginFormData.tsx b/src/components/forms/LoginFormData.tsx new file mode 100644 index 0000000..c72bcd5 --- /dev/null +++ b/src/components/forms/LoginFormData.tsx @@ -0,0 +1,22 @@ +import LoginForm, { type LoginFormValue } from "./LoginForm"; + +export default function LoginFormData() { + function handleOnFormSubmit(data: LoginFormValue) { + fetch(`${import.meta.env.PUBLIC_API_URL}/accounts/login`, { + method: "POST", + body: JSON.stringify(data), + credentials: "include", + headers: { + Accept: "application/json", + "Content-Type": "application/json", + }, + }) + .then((res) => res.json()) + .then((json) => { + window.location.href = "/home"; + }) + .catch((err) => console.log(err)); + } + + return ; +} diff --git a/src/env.d.ts b/src/env.d.ts index f964fe0..5677b56 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1 +1,11 @@ /// + +declare namespace App { + interface Locals { + account?: { + id: number; + username: string; + role_id: number; + }; + } +} diff --git a/src/layouts/HomeLayout.astro b/src/layouts/HomeLayout.astro new file mode 100644 index 0000000..0bf5bfb --- /dev/null +++ b/src/layouts/HomeLayout.astro @@ -0,0 +1,25 @@ +--- +import RootLayout from "./RootLayout.astro"; + +interface Props { + title: string; +} + +const { title } = Astro.props; +--- + + +
+
Films
+
Compte
+
Deconnexion
+
+ +
+
+ +
+
+
+ + diff --git a/src/middleware.ts b/src/middleware.ts new file mode 100644 index 0000000..5edb62e --- /dev/null +++ b/src/middleware.ts @@ -0,0 +1,29 @@ +import { defineMiddleware, sequence } from "astro:middleware"; + +const protectedRoutes = defineMiddleware(async (ctx, next) => { + const pathname = ctx.url.pathname; + if (!["/", "/register"].includes(pathname)) { + const jwt = ctx.cookies.get("token"); + if (!jwt) { + return ctx.redirect("/"); + } + + const res = await fetch( + `${import.meta.env.PUBLIC_API_URL}/accounts/recovery`, + { + credentials: "include", + headers: ctx.request.headers, + }, + ); + + if (res.status !== 201) { + return ctx.redirect("/"); + } + + ctx.locals.account = JSON.parse(await res.text()).account; + } + + return await next(); +}); + +export const onRequest = sequence(defineMiddleware(protectedRoutes)); diff --git a/src/pages/home/index.astro b/src/pages/home/index.astro new file mode 100644 index 0000000..f38a8aa --- /dev/null +++ b/src/pages/home/index.astro @@ -0,0 +1,9 @@ +--- +import HomeLayout from "../../layouts/HomeLayout.astro"; + +const account = Astro.locals.account; +--- + + + Hello {account?.username} + diff --git a/src/pages/index.astro b/src/pages/index.astro index a7a4901..e80e5d5 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,10 +1,8 @@ --- +import LoginFormData from "../components/forms/LoginFormData"; import EmptyLayout from "../layouts/EmptyLayout.astro"; - -const jwt = Astro.cookies.get("jwt"); -if (!jwt) { - Astro.redirect("/login"); -} --- - + + + diff --git a/src/pages/login.astro b/src/pages/login.astro deleted file mode 100644 index 7f63113..0000000 --- a/src/pages/login.astro +++ /dev/null @@ -1,9 +0,0 @@ ---- -import RootLayout from "../layouts/RootLayout.astro"; -import LoginForm from "../components/forms/LoginForm"; -import EmptyLayout from "../layouts/EmptyLayout.astro"; ---- - - - -