vibe.web.auth

Authentication and authorization framework based on fine-grained roles.

Types 4

structRequiresAuthAttribute(AUTH_INFO)

private

structAuthAttribute(R)

private

structRole

Represents a required authorization role.

Roles can be combined using logical or (`|` operator) or logical and (`&` operator). The role name is directly mapped to a method name of the authorization interface specified on the web interface class using the @requiresAuth attribute.

See Also

auth
Methods
R!(Op.ident, name, void, void) opDispatch(string name)() static @property
Constructors

Functions 7

fnRequiresAuthAttribute!void requiresAuth() @propertyEnables authentication and authorization checks for an interface class.
fnRequiresAuthAttribute!AUTH_INFO requiresAuth(AUTH_INFO)() @propertyditto
fnAuthAttribute!R auth(R)(R roles)Enforces authentication and authorization.
fnAuthAttribute!void anyAuth() @propertyEnforces only authentication.
fnNoAuthAttribute noAuth() @propertyDisables authentication checks.
fnauto handleAuthentication(alias fun, C, AUTH_ARGS...)(C c, AUTH_ARGS auth_args)
fnvoid handleAuthorization(C, alias fun, PARAMS...)(AuthInfo!C auth_info)

Templates 3

tmplisAuthenticated(C, alias fun)
tmplAuthInfo(C, CA = C)
tmplGetAuthAttribute(alias fun)