Created
March 6, 2015 20:35
-
-
Save renoirb/c76c171f1e97efa15b85 to your computer and use it in GitHub Desktop.
Check various FxA components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
test_bearer_token='some_bearer_token' | |
test_uid='some_user_uid' | |
echo 'Testing profile profile' | |
curl -k -H "Authorization: Bearer $test_bearer_token" -H 'Content-Type: application/json' "https://profile.accounts.webplatform.org/v1/session/read" | |
echo '' | |
echo 'Testing OAuth server' | |
curl -k -XPOST -H 'Content-Type: application/json' 'https://oauth.accounts.webplatform.org/v1/verify' -d "{\"token\": \"$test_bearer_token\"}" | |
echo '' | |
echo 'Testing Auth server, if an account exists' | |
curl -k -H 'Content-Type: application/json' "https://api.accounts.webplatform.org/v1/account/status?uid=$test_uid" | |
echo '' | |
echo 'Testing Auth server, get some random bytes' | |
curl -k -XPOST -H 'Content-Type: application/json' "https://api.accounts.webplatform.org/v1/get_random_bytes" | |
echo '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment