-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·18 lines (17 loc) · 3.14 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
export FLASK_APP=app.py
export AUTH0_DOMAIN='xaviermm.auth0.com'
export CLIENT_ID='"0W7IYhnZdwsZm8rCEeDHT8PkaQnodqPv"'
export CLIENT_SECRET='"fHdrn7JF-W2YVUrjiUuQRnh3NwnFdhc_gKniU385ljOJrA6GpcrZV4xiyV814Elo"'
export AUDIENCE='"casting-agency"'
GET_TOKEN=$(curl --request POST \
--url https://${AUTH0_DOMAIN}/oauth/token \
--header 'content-type: application/json' \
--data '{"client_id": '${CLIENT_ID}',"client_secret":'$CLIENT_SECRET',"audience":'$AUDIENCE',"grant_type":"client_credentials"}')
# JWT Toke with all permissions
export JWT_TOKEN=`echo ${GET_TOKEN} | jq -r '.access_token'`
# JWT for test RBAC expires (2020-05-04)
export JWT_CASTING_ASSIST='eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InhPR1JhQkdoNGRJVURMTXlMM3RiSiJ9.eyJpc3MiOiJodHRwczovL3hhdmllcm1tLmF1dGgwLmNvbS8iLCJzdWIiOiJhdXRoMHw1ZWE2MThiOTZiNjliYzBjMTJkODFjOGUiLCJhdWQiOiJjYXN0aW5nLWFnZW5jeSIsImlhdCI6MTU4Nzk0NTkzMiwiZXhwIjoxNTg4NjM3MTMyLCJhenAiOiIwVzdJWWhuWmR3c1ptOHJDRWVESFQ4UGthUW5vZHFQdiIsImd0eSI6InBhc3N3b3JkIiwicGVybWlzc2lvbnMiOlsiZ2V0OmFjdG9ycyIsImdldDptb3ZpZXMiXX0.g2yRXA84xVaZTIpZxgggOeyKoU3A89bb2oqaYrJW4cDEoMwrHEW-6D4dJgOsPJPbwgWwIFpsvu4qPN7AhN-8XrFgNgZ3HfTal0p2Dt0gSmVtTzE11Ol1pRtuRqOK87-LXOFq99PXNyci8AvREeIlM4wET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