vibe.d beta banner
get vibe.d
0.8.3

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.

Authors

Sönke Ludwig

Copyright

© 2016 RejectedSoftware e.K.

License

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