-
-
Notifications
You must be signed in to change notification settings - Fork 5
Add authentication decorators #5
Copy link
Copy link
Closed
Labels
P1High priority tasks.High priority tasks.area: adminCode relating to admin functionality like creating and reading form responses.Code relating to admin functionality like creating and reading form responses.area: authenticationCode relating to authentication with the backend service, typically for admin only routes.Code relating to authentication with the backend service, typically for admin only routes.
Metadata
Metadata
Assignees
Labels
P1High priority tasks.High priority tasks.area: adminCode relating to admin functionality like creating and reading form responses.Code relating to admin functionality like creating and reading form responses.area: authenticationCode relating to authentication with the backend service, typically for admin only routes.Code relating to authentication with the backend service, typically for admin only routes.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Right now the authentication route will set an
adminproperty toTruein the token if a record exists in theadmincollection that looks like:{ "_id": "112233445566778899" }Let's write a couple of decorators for use across the application:
Authorizationheader are legitimate (signed by us), else return an error.