No description
Find a file
Jérémy Munsch 81aabdab72
Version 3.0.0
This removes api authentification with token in favor of signature method.
Refactorize code and clean up. It add more unit test plus code coverage
in test/converage.

- Added config.api.timestampTimeout
- Added Helper::signRequest This calculates the request signature
- Added more unit tests and extend code coverage.
- Added rate limiter for web routes
- Added RemoveSpaces Sanitizer on api requests
- Added stress test suite
- Changed AuthServiceProvider api-token to api-hmac
- Changed CustomerSeeder to have at least of customer activated (for unit tests)
- Changed used transation for saveing multiple models
- Changed, in ServiceController generateApiToken to generateServicePassword
- Changed, timestamp has to be send in request with a DateTime format, it also has to a UTC  value
- Composer added brianium/paratest
- Composer update
- Fixed case where removing single optin could be the wrong one (not for the good service)
- Fixed customer delete
- Fixed customer would not be resolved by brand.
- Fixed Really check that request is json checking body content, preventing sending malformed requests
- Remove ApiError::needAuth
- Removed api_token
- Removed ApiController::authenticate
- Removed config.api.tokenTimeout
- Removed Header check or usage because of HAProxy doing weird stuff
- Removed lock files from gitignore
- Removed memcached dependency
- Removed unused questions resources api routes
- Removed workspace file

Migrations
- Added unique index on services.bearer_token
- Changed customer_id on customer_answer is nullable
- Changed services.bearer_pwd length to 312 (the size of the token)
- Dropped services.api_token and service.api_token_date
2022-01-06 12:11:05 +01:00
app Version 3.0.0 2022-01-06 12:11:05 +01:00
bootstrap Init 2020-12-01 17:02:10 +01:00
clients Version 3.0.0 2022-01-06 12:11:05 +01:00
config Version 3.0.0 2022-01-06 12:11:05 +01:00
database Version 3.0.0 2022-01-06 12:11:05 +01:00
MIG CRM Migrate from old CRM (Le Gaulois) 2021-04-19 10:51:27 +02:00
public overhaull UI upgrade 2021-09-09 16:08:37 +02:00
resources print Stats to JS 2021-11-03 17:02:59 +01:00
routes Version 3.0.0 2022-01-06 12:11:05 +01:00
storage - Add Arcada outgoingMail 2021-02-19 16:32:08 +01:00
tests Version 3.0.0 2022-01-06 12:11:05 +01:00
.editorconfig Init 2020-12-01 17:02:10 +01:00
.env.example CRM Migrate from old CRM (Le Gaulois) 2021-04-19 10:51:27 +02:00
.env.testing.example change unit test server ip from 127.0.0.25 to 127.0.0.1 (seems to have stoped working on wsl ?) 2021-10-26 10:00:27 +02:00
.gitattributes Init 2020-12-01 17:02:10 +01:00
.gitignore Version 3.0.0 2022-01-06 12:11:05 +01:00
.gitmodules cleanup git module flaw 2021-12-05 18:28:53 +01:00
.styleci.yml Init 2020-12-01 17:02:10 +01:00
artisan Init 2020-12-01 17:02:10 +01:00
composer.json Version 3.0.0 2022-01-06 12:11:05 +01:00
composer.lock Version 3.0.0 2022-01-06 12:11:05 +01:00
package-lock.json Version 3.0.0 2022-01-06 12:11:05 +01:00
package.json add laravel-mix-clean 2021-11-10 16:57:03 +01:00
phpcs.xml Version 3.0.0 2022-01-06 12:11:05 +01:00
phpunit.xml Version 3.0.0 2022-01-06 12:11:05 +01:00
README.md Version 3.0.0 2022-01-06 12:11:05 +01:00
server.php Init 2020-12-01 17:02:10 +01:00
test.sh Version 3.0.0 2022-01-06 12:11:05 +01:00
webpack.mix.js add laravel-mix-clean 2021-11-10 16:57:03 +01:00

Comment lancer les tests unitaires ?

Attention, si vous utilisez juste un .env à la place d'un .env.testing votre base de donnée de developpement sera effacée à chaque lancement des tests unitaires

Etapes :

  • cp .env.testing.example .env.testing (spécial tests unitaires)
  • php artisan key:generate
  • parameter les BDD dans le .env.testing
  • php artisan config:cache
  • git submodule init
  • git submodule update (récupérer le client)
  • composer install
  • service start mysql (votre base de donnée accessible sur 127.0.0.1:3306)
  • chmod u+x ./test.sh
  • php artisan optimize
  • composer run test