SignatureListener
in package
implements
EventSubscriberInterface
Listener used to sign requests before they are sent over the wire
Table of Contents
Interfaces
- EventSubscriberInterface
- An EventSubscriber knows himself what events he is interested in.
Properties
Methods
- __construct() : mixed
- Construct a new request signing plugin
- getSubscribedEvents() : array<string|int, mixed>
- Returns an array of event names this subscriber wants to listen to.
- onCredentialsChanged() : mixed
- Updates the listener with new credentials if the client is updated
- onRequestBeforeSend() : mixed
- Signs requests before they are sent
Properties
$credentials
protected
CredentialsInterface
$credentials
$signature
protected
SignatureInterface
$signature
Methods
__construct()
Construct a new request signing plugin
public
__construct(CredentialsInterface $credentials, SignatureInterface $signature) : mixed
Parameters
- $credentials : CredentialsInterface
-
Credentials used to sign requests
- $signature : SignatureInterface
-
Signature implementation
getSubscribedEvents()
Returns an array of event names this subscriber wants to listen to.
public
static getSubscribedEvents() : array<string|int, mixed>
Return values
array<string|int, mixed> —The event names to listen to
onCredentialsChanged()
Updates the listener with new credentials if the client is updated
public
onCredentialsChanged(Event $event) : mixed
Parameters
- $event : Event
-
Event emitted
onRequestBeforeSend()
Signs requests before they are sent
public
onRequestBeforeSend(Event $event) : mixed
Parameters
- $event : Event
-
Event emitted