summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2021-07-12 20:56:00 -0600
committermo khan <mo@mokhan.ca>2021-07-12 20:56:00 -0600
commit6e71b33e1d12ca63e8f05dfb17afe2321b8108a2 (patch)
tree33664e02c07956e8349321b6563057c28b87f39a /bin
parentf79abd6c0784b1f0ea798fa2225b0c3303318bb6 (diff)
use the jwt to make an API call
Diffstat (limited to 'bin')
-rwxr-xr-xbin/jwt11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/jwt b/bin/jwt
index dcb54e5..8b616f8 100755
--- a/bin/jwt
+++ b/bin/jwt
@@ -20,4 +20,13 @@ jwt = JWT.encode(
private_key,
"RS256"
)
-puts jwt.inspect
+
+command = [
+ :curl,
+ '-i',
+ "-H 'Authorization: Bearer #{jwt}'",
+ "-H 'Accept: application/vnd.github.v3+json'",
+ "https://api.github.com/app"
+].map(&:to_s).join(' ')
+
+system(command)