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
static array
getSubscribedEvents()
No description
__construct(array $rules)
No description
onApiAuthorize( $event)
Determine which, if any, whitelist rules apply this request.
onApiRespond( $event)
Apply any filtering rules based on the chosen whitelist rule.
Details
at line 48
static array
getSubscribedEvents()
at line 75
__construct(array $rules)
at line 95
onApiAuthorize( $event)
Determine which, if any, whitelist rules apply this request.
Reject unauthorized requests.
at line 113
onApiRespond( $event)
Apply any filtering rules based on the chosen whitelist rule.