I have created a custom filter:
class JwtAuth : public drogon::HttpFilter<JwtAuth>
And applied it in my controller:
class AuthController : public drogon::HttpController<AuthController>
{
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?
I have created a custom filter:
class JwtAuth : public drogon::HttpFilter<JwtAuth>And applied it in my controller:
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?