{
exp: 1470299383,
username: "admin",
roles: [
"ROLE_ADMIN"
],
iat: "1470212983"
}
admin url: /api/admin/login_check customer url: /api/customer/login_check seller url: /api/seller/login_check
method: POST
body:
- _username: admin
- _password: open
response:
{
"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9.eyJleHA",
"refresh_token":"44588da231e2f480bd4"
}
url: /api/token/refresh
method: POST
body:
- refresh_token: 'token'
response:
{
"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9.eyJleHA",
"refresh_token":"44588da231e2f480bd4"
}
Proper listener should be created to handle system events. Example definition of such listener:
oloy.listener:
class: 'OpenLoyalty\Listener.php'
tags:
- { name: broadway.event_listener, event: oloy.customer.registered, method: handle }
Event class: OpenLoyalty\Domain\Customer\SystemEvent\CustomerRegisteredSystemEvent
Event class: OpenLoyalty\Domain\Customer\SystemEvent\CustomerUpdatedSystemEvent
Event class: OpenLoyalty\Domain\Customer\SystemEvent\CustomerAgreementsUpdatedSystemEvent
Event class: OpenLoyalty\Domain\Customer\SystemEvent\CustomerDeactivatedSystemEvent
Event class: OpenLoyalty\Domain\Segment\SystemEvent\CustomerAddedToSegmentSystemEvent
Event class: OpenLoyalty\Domain\Segment\SystemEvent\CustomerRemovedFromSegmentSystemEvent
Proper listener should be created to handle domain events. This listener must implement Broadway\EventHandling\EventListenerInterface
Example definition of such listener:
oloy.listener:
class: 'OpenLoyalty\Listener.php'
lazy: true
tags:
- { name: broadway.domain.event_listener }