add simple script to fetch barentwatch token
This commit is contained in:
16
scripts/get-barentswatch-token.sh
Executable file
16
scripts/get-barentswatch-token.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! $# -eq 2 ]; then
|
||||
echo "usage: client_id password"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
client_id="$1"
|
||||
password="$2"
|
||||
|
||||
curl -X POST \
|
||||
--header "Content-Type: application/x-www-form-urlencoded" \
|
||||
-d "client_id=$client_id&scope=api&client_secret=$password&grant_type=client_credentials" \
|
||||
https://id.barentswatch.no/connect/token
|
||||
|
||||
# vim: set filetype=bash:
|
||||
Reference in New Issue
Block a user