mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-31 16:14:46 +02:00
move resource auth to auth router
This commit is contained in:
parent
50e2d6721f
commit
cc05baf67d
3 changed files with 15 additions and 22 deletions
|
@ -281,10 +281,6 @@ authenticated.post(
|
|||
verifyUserHasAction(ActionsEnum.setResourceAuthMethods),
|
||||
resource.setResourcePassword,
|
||||
);
|
||||
unauthenticated.post(
|
||||
"/resource/:resourceId/auth/password",
|
||||
resource.authWithPassword,
|
||||
);
|
||||
|
||||
authenticated.post(
|
||||
`/resource/:resourceId/pincode`,
|
||||
|
@ -292,10 +288,6 @@ authenticated.post(
|
|||
verifyUserHasAction(ActionsEnum.setResourceAuthMethods),
|
||||
resource.setResourcePincode,
|
||||
);
|
||||
unauthenticated.post(
|
||||
"/resource/:resourceId/auth/pincode",
|
||||
resource.authWithPincode,
|
||||
);
|
||||
|
||||
unauthenticated.get("/resource/:resourceId/auth", resource.getResourceAuthInfo);
|
||||
|
||||
|
@ -382,7 +374,7 @@ unauthenticated.use("/auth", authRouter);
|
|||
authRouter.use(
|
||||
rateLimitMiddleware({
|
||||
windowMin: 10,
|
||||
max: 15,
|
||||
max: 75,
|
||||
type: "IP_AND_PATH",
|
||||
}),
|
||||
);
|
||||
|
@ -412,3 +404,6 @@ authRouter.post(
|
|||
);
|
||||
authRouter.post("/reset-password/request", auth.requestPasswordReset);
|
||||
authRouter.post("/reset-password/", auth.resetPassword);
|
||||
|
||||
authRouter.post("/resource/:resourceId/password", resource.authWithPassword);
|
||||
authRouter.post("/resource/:resourceId/pincode", resource.authWithPincode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue