Also, I forgot to ask, does @before means that authenticate will be invoked before any REST API call? I mean, if I invoke getSecret for example, vibed will invoke authenticate and getSecret after that? In this case(if my definition is true), what's the purpose of returning an User object from authenticate? Who will see that object..?

On Tue, 28 Apr 2015 17:07:10 GMT, Dato wrote:

Thank you very much guys. One more thing, I'm not sure I understand what does the string parameter (in this case "user") does in

@before!authenticate("user")

and what's the 'result' parameter of addBrackets?

string addBrackets(string result /* THIS ONE */, HTTPServerRequest, HTTPServerResponse)
{
	return "{" ~ result ~ "}";
}

Is this the generated response string?

Thanks again :)