WhitelistSubscriber
class WhitelistSubscriber implements EventSubscriberInterface
The WhitelistSubscriber listens to API requests and matches them against a whitelist of allowed API calls. If an API call does NOT appear in the whitelist, then it generates an error.
Properties
protected array | $rules | Array(WhitelistRule). | |
protected array | $activeRules | Array (scalar $reqId => WhitelistRule $rule). |
Methods
Details
at line 47
static array
getSubscribedEvents()
at line 74
__construct(array $rules)
at line 94
onApiAuthorize(AuthorizeEvent $event)
Determine which, if any, whitelist rules apply this request.
Reject unauthorized requests.
at line 112
onApiRespond(RespondEvent $event)
Apply any filtering rules based on the chosen whitelist rule.