Bonjour,
Pour les appels des WS simplicité, est-il possible de gérer un jeton Bearer pour s’identifier auprès du BE.
Actuellement on passe obligatoirement par une authentification Basic (username & password), et lorsqu’on souhaite utiliser l’access token, j’ai l’erreur suivante :
2018-05-18 09:55:54,851 ERROR [com.simplicite.webapp.servlets.api.RESTServlet] SIMPLICITE|http://c52c163604ac:8080||ERROR|system|com.simplicite.webapp.servlets.api.RESTServlet|getWebServicesFactory||Event: Simplicite authentication error: Invalid token
a010372@FRLH108902 MINGW64 ~ (master)
$ curl -X GET ‘https://bca.dok-re7.intra.renault.fr/api/login?_json=true&username=awdpl01&password=simplicite’ --insecure
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 224 100 224 0 0 224 0 0:00:01 --:–:-- 0:00:01 572{“firstname”:"69229 ",“langiso”:“fr”,“timezone”:“Europe/Paris”,“authtoken”:“z3iBZSBu733pxiCRuLI5fNFm0hGbx2qBmYbT18e4zOlW6PGR3J”,“sessionid”:“6D683F01F0DA73CC78D609F800ADAEB0”,“login”:“awdpl01”,“lang”:“FRA”,“lastname”:“Gdpr”}
a010372@FRLH108902 MINGW64 ~ (master)
$ curl -X GET -b cookies.txt -c cookies.txt ‘https://bca.dok-re7.intra.renault.fr/api/rest/BCSIDataProcess’ -H ‘X-Simplicite-Authorization: Bearer z3iBZSBu733pxiCRuLI5fNFm0hGbx2qBmYbT18e4zOlW6PGR3J’ --insecure
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 43 100 43 0 0 43 0 0:00:01 --:–:-- 0:00:01 161{ “status”: 401, “error”: “Invalid token” }