Commit 6e71b33

mo khan <mo@mokhan.ca>
2021-07-13 02:56:00
use the jwt to make an API call
1 parent f79abd6
Changed files (1)
bin
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)