You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to implement a system which has use either of these strategies:
There is a api-key header. Alongside this, we need to specify a custom userId in body as well for requests to be valid.
There is a jwt token ( Authorization header ), this is valid too.
Questions
Can I use .guard() for a macro? I want to make sure any endpoint using a macro has proper validation.
Is there any performance benefit to use schema validation, next to .beforeHandle method? or should I put my logic into beforeHandle only and forget the schema validation?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to implement a system which has use either of these strategies:
api-key
header. Alongside this, we need to specify a customuserId
inbody
as well for requests to be valid.jwt
token (Authorization
header ), this is valid too.Questions
.guard()
for a macro? I want to make sure any endpoint using a macro has proper validation..beforeHandle
method? or should I put my logic into beforeHandle only and forget the schema validation?Beta Was this translation helpful? Give feedback.
All reactions