Session Method Parameter Decorator
See original GitHub issueIs the @Session decorator avaible?
I attach to req.session an user object after sucessfull authentication and use it in controler method to check if user is an owner of demanded object from database.
It would be nice to have :
@Get("/posts")
getAll(@Session("user") user: User) {
return postsRepository.getAllByUser(user);
}
And don’t have to parse request object by myself 😉
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How to use python decorators for session validation
i am using session as a global variable like below. How to perform this validation using python decorators?
Read more >Chapter 8. Decorators
A decorator implements one or more bean types and intercepts business method invocations of beans which implement those bean types. These bean types...
Read more >Primer on Python Decorators
In this introductory tutorial, we'll look at what Python decorators are and how to create and use them.
Read more >Custom decorators | NestJS - A progressive Node.js framework
Decorators can be defined for either a class, a method or a property. ... Nest provides a set of useful param decorators that...
Read more >NestJS — Creating custom parameter decorators for your APIs ...
Here are five decorators that you may already have been frequently using for creating APIs: @Session , @Param , @Body , @Query and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

thanks @19majkel94 . Hope someone take care of it in koa too
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.