Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mlefort committed Apr 30, 2014
2 parents a813c02 + 2a5e34e commit cd85d09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions authentification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ Exemple avec cURL et WGET

L'utilisation du header authorization avec cURL est très simple. Imaginons un utilisateur doté des identifiants suivants :

* login : demo@demo.fr
* password : demo
* login : demo
* password : demo4dev

L'instruction cURL à utiliser pour accéder à la donnée "demo.demovelov" sur le service smartdata serait alors :

::

cURL -u demo@demo.fr:demo curl https://download.data.grandlyon.com/ws/smartdata/demo.demovelov/all.json?compact=false
cURL -u demo:demo4dev curl https://download.data.grandlyon.com/ws/smartdata/demo.demovelov/all.json?compact=false

sauf erreur, vous devriez alors recevoir un flux json.

L'instruction WGET à utiliser est comparable :

::

wget --http-user=demo@demo.fr --http-password=demo https://download.data.grandlyon.com/ws/smartdata/demo.demovelov/all.json?compact=false
wget --http-user=demo --http-password=demo4dev https://download.data.grandlyon.com/ws/smartdata/demo.demovelov/all.json?compact=false


Exemples avec PHP ou Python
Expand Down

0 comments on commit cd85d09

Please sign in to comment.