vibe.web.auth

Authentication and authorization framework based on fine-grained roles.

Types 6

structRequiresAuthAttribute(AUTH_INFO)

private

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)() @property
Constructors
private enumOp
none
and
or
ident
private structR(Op op_, string ident_, Left_, Right_)
Fields
ident_ ident
Methods
R!(Op.or, null, R, O) opBinary(string op : "|", O)(O other)
R!(Op.and, null, R, O) opBinary(string op : "&", O)(O other)

Functions 8

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)
private fnbool evaluate(string methodname, R, A, alias ParamNames, PARAMS...)(ref A a)

Templates 3

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