drogonframework / drogonframework/drogon
# Question about custom HttpFilter registration and instantiation
Open
- Dominant language
- C++
- Stars
- 14.3k
- Forks
- 1.4k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 15
Description
I have created a custom filter:
`class JwtAuth : public drogon::HttpFilter`
And applied it in my controller:
```cpp
class AuthController : public drogon::HttpController
{
METHOD_LIST_BEGIN
ADD_METHOD_TO(AuthController::login, "/api/login", drogon::Post);
ADD_METHOD_TO(AuthController::changePassword, "/api/change-password", drogon::Post, "JwtAuth");
METHOD_LIST_END
};
```
**Do I need to create a JwtAuth instance manually somewhere?
Do I need to list JwtAuth in the config.json file?
Or will Drogon register and manage the filter automatically?**
Contributor guide
Assessment
This issue has not been assessed yet.