Function requiresAuth
Enables authentication and authorization checks for an interface class.
vibe .web .auth .RequiresAuthAttribute!(void) requiresAuth() @property;
RequiresAuthAttribute!AUTH_INFO requiresAuth(AUTH_INFO)() @property;
Web/REST interface classes that have authentication enabled are required
to specify either the @auth
or the @noAuth
attribute for every public
method.
The type of the authentication information, as returned by the
authenticate()
method, can optionally be specified as a template argument.
This is useful if an interface
is annotated and the authenticate()
method is only declared in the actual class implementation.