Page Contents

Home > @loopback/authorization > authorize > vote

authorize.vote() function

Shortcut to configure voters

Signature:

vote: (...voters: (Authorizer | BindingAddress<Authorizer>)[]) => (target: any, method?: string | undefined, methodDescriptor?: TypedPropertyDescriptor<any> | undefined) => any

Parameters

Parameter Type Description
voters ([Authorizer](/doc/en/lb4/apidocs.authorization.authorizer.html) \| [BindingAddress](/doc/en/lb4/apidocs.context.bindingaddress.html)<[Authorizer](/doc/en/lb4/apidocs.authorization.authorizer.html)>)\[\]

Returns:

(target: any, method?: string | undefined, methodDescriptor?: TypedPropertyDescriptor<any> | undefined) => any