![]() |
Cavoke
1.1.0
A Platform for creating and hosting multiplayer turn-based board games
|
#include <AuthFilter.h>
Classes | |
struct | AuthConfig |
Public Member Functions | |
void | doFilter (const HttpRequestPtr &req, FilterCallback &&fcb, FilterChainCallback &&fccb) override |
Static Public Member Functions | |
static std::string | get_user_id (const HttpRequestPtr &) |
Acquires user_id parsed during AuthFilter 's execution. | |
Provides an authentication interceptor that checks a bearer token using a public key given in the configuration file.
If authenticated, makes user_id available to controllers through AuthFilter::get_user_id(req)
.
If no configuration for auth
is found, allows all requests and acquires user_id
from query param with the same name. A corresponding warning about running in the insecure mode will be displayed in the logs.
Definition at line 23 of file AuthFilter.h.
AuthFilter::AuthFilter | ( | ) |
Definition at line 5 of file AuthFilter.cc.
|
override |
Definition at line 32 of file AuthFilter.cc.
|
static |
Acquires user_id
parsed during AuthFilter
's execution.
Definition at line 82 of file AuthFilter.cc.