Move credentials in a different file
This commit is contained in:
parent
7a99fe3a75
commit
454eef7085
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*~
|
||||||
|
credentials
|
@ -20,7 +20,7 @@ docker run -p 8080:8080 --rm --name pycloud pycloud:latest
|
|||||||
|
|
||||||
3. Get token
|
3. Get token
|
||||||
|
|
||||||
Depuis le présent dépot git, ajouter son login/mdp au script get_token.sh
|
Depuis le présent dépot git, copier le fichier credentials.example en credentials et y ajouter son login/mdp.
|
||||||
|
|
||||||
```
|
```
|
||||||
./get_token.sh
|
./get_token.sh
|
||||||
|
2
credentials.example
Normal file
2
credentials.example
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
username=XXX@cloe # login_ac_dijon@cloe
|
||||||
|
password= # mot de passe défini via l'iface web de CLOE VRA8
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
username=XXX@cloe # login_ac_dijon@cloe
|
source ./credentials
|
||||||
password= # mot de passe défini via l'iface web de CLOE VRA8
|
|
||||||
|
|
||||||
refresh_token=$(curl -X POST -H "Content-Type: application/json" -d "{\"username\":\"${username}\", \"password\":\"${password}\"}" 127.0.0.1:8080/login | jq -r .refresh_token)
|
refresh_token=$(curl -X POST -H "Content-Type: application/json" -d "{\"username\":\"${username}\", \"password\":\"${password}\"}" 127.0.0.1:8080/login | jq -r .refresh_token)
|
||||||
echo refresh_token: $refresh_token
|
echo refresh_token: $refresh_token
|
||||||
|
Loading…
Reference in New Issue
Block a user