performBasicAuth - multiple declarations
Function performBasicAuth
Returns a request handler that enforces request to be authenticated using HTTP Basic Auth.
@safe void delegate(scope HTTPServerRequest, HTTPServerResponse) performBasicAuth
(
string realm,
@safe bool delegate(string, string) pwcheck
) @safe;
Function performBasicAuth
Scheduled for deprecation - use a @safe
callback instead.
@safe void delegate(scope HTTPServerRequest, HTTPServerResponse) performBasicAuth
(
string realm,
bool delegate(string, string) pwcheck
);
Function performBasicAuth
Enforces HTTP Basic Auth authentication on the given req/res pair.
string performBasicAuth
(
scope HTTPServerRequest req,
scope HTTPServerResponse res,
string realm,
scope @safe bool delegate(string, string) pwcheck
) @safe;
Parameters
Name | Description |
---|---|
req | Request object that is to be checked |
res | Response object that will be used for authentication errors |
realm | HTTP Basic Auth realm reported to the client |
pwcheck | A delegate queried for validating user/password pairs |
Returns
Returns the name of the authenticated user.
Throws
Throws a HTTPStatusExeption in case of an authentication failure.
Function performBasicAuth
Scheduled for deprecation - use a @safe
callback instead.
string performBasicAuth
(
scope HTTPServerRequest req,
scope HTTPServerResponse res,
string realm,
scope bool delegate(string, string) pwcheck
);