vibe.d beta banner
get vibe.d
0.7.30

performDigestAuth - multiple declarations

  • Function performDigestAuth
  • Function performDigestAuth

Function performDigestAuth

Returns a request handler that enforces request to be authenticated using HTTP Digest Auth.

Prototype

void delegate(HTTPServerRequest, HTTPServerResponse) performDigestAuth(
  DigestAuthInfo info,
  scope string delegate(string, string) pwhash
);

Function performDigestAuth

Enforces HTTP Digest Auth authentication on the given req/res pair.

Prototype

string performDigestAuth(
  scope HTTPServerRequest req,
  scope HTTPServerResponse res,
  DigestAuthInfo info,
  scope string delegate(string, string) pwhash
);

Parameters

NameDescription
req Request object that is to be checked
res Response object that will be used for authentication errors
info Digest authentication info object
pwhash A delegate queried for returning the digest password

Returns

Returns the name of the authenticated user.

Throws

Throws a HTTPStatusExeption in case of an authentication failure.

Authors

Kai Nacke

Copyright

© 2015 RejectedSoftware e.K.

License

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