vibe.d beta banner
get vibe.d

Asynchronous I/O that doesn’t get in your way, written in D

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.


Sönke Ludwig


© 2016 RejectedSoftware e.K.


Subject to the terms of the MIT license, as written in the included LICENSE.txt file.