hb.web.auth

Authentication and authorization framework based on fine-grained roles.

Members

Functions

auth
AuthAttribute!R auth(R roles)

Enforces authentication and authorization.

handleAuthentication
auto handleAuthentication(C c, HTTPServerRequest req, HTTPServerResponse res)
Undocumented in source. Be warned that the author may not have intended to support it.
handleAuthorization
void handleAuthorization(AuthInfo!C auth_info)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

anyAuth
AuthAttribute!void anyAuth [@property getter]

Enforces only authentication.

auth
AuthAttribute!void auth [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
noAuth
NoAuthAttribute noAuth [@property getter]

Disables authentication checks.

requiresAuth
auto requiresAuth [@property getter]

Enables authentication and authorization checks for an interface class.

Structs

AuthAttribute
struct AuthAttribute(R)

private

NoAuthAttribute
struct NoAuthAttribute
Undocumented in source.
RequiresAuthAttribute
struct RequiresAuthAttribute(alias T = null)

private

Role
struct Role

Represents a required authorization role.

Templates

AuthInfo
template AuthInfo(C, CA = C)
Undocumented in source.
FunAuthInfo
template FunAuthInfo(C, CA = C)
Undocumented in source.
isAuthenticated
template isAuthenticated(C, alias fun)
Undocumented in source.

Meta

License

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

Authors

Sönke Ludwig