Skip to content

caesar-team/CaesarSecureMessageBundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SecurityMessageBundle

Installation

  1. Install component via composer
composer require caesar/security-message-bundle
  1. Add component into config/bundles.php with following content:
return [
//.............
Caesar\SecurityMessageBundle\SecurityMessageBundle::class => ['all' => true],
//.............
];
  1. Add the configuration yaml into config/routes/security_message.yaml with following content:
security_message_bundle:
  resource: '@SecurityMessageBundle/Controller/MessageController.php'
  prefix: /
  type: annotation
  1. Implement Caesar/SecurityMessageBundle/Service/ClientInterface.php

  2. Add the configuration yaml into config/packages/security_message.yaml with following content:

security_message:
  client: <Class that implemented ClientInterface>

Usage

####Create new message: POST /message with

{
  "message": "string",
  "secondsLimit": 20,
  "requestsLimit": 20
}

####Get message GET /message/{id}