Spaces:
Running
Running
File size: 416 Bytes
b110593 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
#!/bin/bash
set -eou pipefail
# Jump to root directory
cd "$( dirname "${BASH_SOURCE[0]}" )"/../.. || exit 1
function main() {
USERNAME=${1:-johndoe}
PASSWORD=$USERNAME
curl --fail -s -X POST -d grant_type=password -d client_id=demo -d username="$USERNAME" -d password="$PASSWORD" http://localhost:9090/auth/realms/weaviate/protocol/openid-connect/token | jq -r ".access_token"
}
main "$@"
|