Connectable
trait Connectable
Connectable pushes CEO data to connected front end. A connectable item is pushed into the queue then exported and pushed to a specified endpoint.
Using a JWT to confirm transmission authority, you can manage remote content automatically for a connected frontend.
As of CEO 1.5 connectable items must be manually pushed using the Connectable trait
and the pushToConnector method.
Connectable expects a configuration key with an encryption key (for the JWT) and a JSON endpoint:
'client' => [
'publication' => 'The State News',
'site' => 'http://statenews.com',
'connector' => [
'key' => 'mysecretkey',
'url' => 'https://some.tld/path/to/endpoint',
]
],
JWT will be provided as a Bearer token and will contain the the claims:
- srn - string SRN
- action - enum [create, update, delete]
HTTP Method will be POST and body will contain JSON encoded connected object.
You may provide a custom filter by overloading the connectableCallback method in your
model and returning false to stop the connector from firing.
Methods
Push items to connected front end
Details
at line line 44
pushToConnector(array $kwargs = array())
Push items to connected front end