TSAP-Laval / acquisition-backend

MIT License
1 stars 0 forks source link

Pre requis [breaking changes] #91

Closed laurentlp closed 7 years ago

laurentlp commented 7 years ago

Before submitting a pull request, make sure you have:

Purpose of your pull request?

Complete and detailed description of your PR

J'ai ajouté la fonctionnalité permettant de s'authentifier sur l'API. Lors d'une authentification réussie, un token est retourné et c'est avec lui que l'on va pouvoir communiquer avec le serveur sans quoi une erreur HTTP 401 unauthorized est lancée. Ainsi, j'ai du adapter les tests en conséquence. Pour permettre de tester avec le token de connexion, il suffit d'utiliser la fonction SecureRequest au lieu du http.DefaultClient.Do. Aussi, il faut s'assurer d'avoir setté les middlewares nécessaires dans le routing (routes.go). Les 3 middlewares sont celui du JSON Web Token (JWT), celui du limiteur de requête (max 30 requêtes par secondes un peu inutile, mais permet de faire passer les tests (plus de 30 req/sec)) et celui qui restreint les en-têtes http. Il faudra donc s'assurer que les modifications nécessaire soient faites front-end aussi !

laurentlp commented 7 years ago

https://github.com/TSAP-Laval/acquisition-backend/issues/89 https://github.com/TSAP-Laval/acquisition-backend/issues/75 https://github.com/TSAP-Laval/acquisition-backend/issues/40

coveralls commented 7 years ago

Coverage Status

Coverage increased (+22.05%) to 92.374% when pulling 3314658a9b9a212e65983ba9b3b30d071fd73040 on pre_requis into a30bbed840857bcac76073158fac1cf16354ff68 on dev.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+22.05%) to 92.374% when pulling 3314658a9b9a212e65983ba9b3b30d071fd73040 on pre_requis into a30bbed840857bcac76073158fac1cf16354ff68 on dev.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.02%) to 91.681% when pulling cce484825bd0fcdab424b8b0cc59efd0ec89501a on pre_requis into 366b2ada222daaa89dfcd876c93d57b0655e8f26 on dev.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.3%) to 91.42% when pulling 09986780f915937fa055b628ba598f2c67422a1a on pre_requis into 366b2ada222daaa89dfcd876c93d57b0655e8f26 on dev.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+8.1%) to 99.825% when pulling ab00340b227ece4beac6a0c5f4ace90586470f1d on pre_requis into 366b2ada222daaa89dfcd876c93d57b0655e8f26 on dev.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+8.1%) to 99.825% when pulling 6b0465b329f953a10767b7a7679eaf62eb4cf7dc on pre_requis into 366b2ada222daaa89dfcd876c93d57b0655e8f26 on dev.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+8.1%) to 99.821% when pulling 146e0c949ba3a972c7767dc5a3dd2edb987c9040 on pre_requis into 366b2ada222daaa89dfcd876c93d57b0655e8f26 on dev.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+8.1%) to 99.821% when pulling 7c7c2ee179fa2ee0a51a96023eb36d291cc97126 on pre_requis into 366b2ada222daaa89dfcd876c93d57b0655e8f26 on dev.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+8.1%) to 99.821% when pulling afb311a89f33286d780ff153b14e1670e15ec0ad on pre_requis into 366b2ada222daaa89dfcd876c93d57b0655e8f26 on dev.