Interface IControllersAuthorizeOptions

Describes the object for 'authorize' prop of 'IControllersOptions' interface.

interface IControllersAuthorizeOptions {
    findAuthorizedUser?: Nilable<AuthorizedUserProvider>;
    onValidationFailed?: Nilable<AuthorizeValidationFailedHandler>;
    setupMiddleware?: Nilable<SetupAuthorizeMiddlewareHandler>;
    use?: Nilable<HttpMiddleware[]>;
    validator?: Nilable<AuthorizeValidatorValue>;
}

Properties

findAuthorizedUser?: Nilable<AuthorizedUserProvider>

A default function, which tries to find a user for the current request.

onValidationFailed?: Nilable<AuthorizeValidationFailedHandler>

Is invoked, when validationf failes.

setupMiddleware?: Nilable<SetupAuthorizeMiddlewareHandler>

A custom, global function to setup an 'authorize' middleware.

use?: Nilable<HttpMiddleware[]>

A list of custom middlewares to add BEFORE the authorize middleware.

validator?: Nilable<AuthorizeValidatorValue>

The default validator.

Generated using TypeDoc