Skip to content

Instantly share code, notes, and snippets.

@renoirb
Created March 6, 2015 20:35
Show Gist options
  • Save renoirb/c76c171f1e97efa15b85 to your computer and use it in GitHub Desktop.
Save renoirb/c76c171f1e97efa15b85 to your computer and use it in GitHub Desktop.
Check various FxA components
#!/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