{"_id":"gapitoken","_rev":"19-a82e0e9614136138674c69e33c5f094a","name":"gapitoken","description":"Node.js module for Google API service account authorization (Server to Server flow)","dist-tags":{"latest":"0.1.5"},"versions":{"0.0.1":{"name":"gapitoken","version":"0.0.1","description":"Node.js module for Google API service account authorization (Server to Server flow)","main":"gapitoken.js","repository":{"type":"git","url":"git://github.com/bsphere/node-gapitoken.git"},"keywords":["jwt","jws","google","api","token","service"],"author":{"name":"Gal Ben-Haim"},"license":"MIT","dependencies":{"jws":"0.0.2"},"_id":"gapitoken@0.0.1","dist":{"shasum":"dc2af12d2eaa9dbcfaa5d4fc55ee352c74d7466d","tarball":"https://registry.npmjs.org/gapitoken/-/gapitoken-0.0.1.tgz","integrity":"sha512-mfeJTyi9tQH7Uwvom3DkmtPggSdlMxkWTwBL6vnRbAuBaARTCW987aB6UV+R38HcP0cR2XZIP9OtYiy1ZL00kA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFN0Dxf1VOYJQvCropIbfvmYubk33L4Zzd+IbI7hT1CtAiAQwhGLP6yBICDjYYmYiSj/kD0WmJuyHVV9NnaNt4DNCA=="}]},"_npmVersion":"1.1.71","_npmUser":{"name":"bsphere","email":"gbenhaim@gmail.com"},"maintainers":[{"name":"bsphere","email":"gbenhaim@gmail.com"}]},"0.0.2":{"name":"gapitoken","version":"0.0.2","description":"Node.js module for Google API service account authorization (Server to Server flow)","main":"gapitoken.js","repository":{"type":"git","url":"git://github.com/bsphere/node-gapitoken.git"},"keywords":["jwt","jws","google","api","token","service"],"author":{"name":"Gal Ben-Haim"},"license":"MIT","dependencies":{"jws":"0.0.2"},"_id":"gapitoken@0.0.2","dist":{"shasum":"97c68b4c64886ab7961dc08a109ce2f4ee76c4be","tarball":"https://registry.npmjs.org/gapitoken/-/gapitoken-0.0.2.tgz","integrity":"sha512-6JY7S5jGQ6WdiRyuhLGZvr+g6bUhStmxVJUjJR+by5kAHxoJFsLKCwxjpPeuR1i4lsYzZqZXgpO8Z/7NKEZyxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBrOveyZ9C/k2Dah/GlWqeDvXwZ2mixQaM1pVerp3pORAiAKHys4JV1TNOVCFpBF9k/s9aVAzQ2r/+NLGSh3YPF3mA=="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"bsphere","email":"gbenhaim@gmail.com"},"maintainers":[{"name":"bsphere","email":"gbenhaim@gmail.com"}]},"0.0.3":{"name":"gapitoken","version":"0.0.3","description":"Node.js module for Google API service account authorization (Server to Server flow)","main":"gapitoken.js","repository":{"type":"git","url":"git://github.com/bsphere/node-gapitoken.git"},"keywords":["jwt","jws","google","api","token","service"],"author":{"name":"Gal Ben-Haim"},"license":"MIT","dependencies":{"jws":"0.0.2"},"_id":"gapitoken@0.0.3","dist":{"shasum":"7e2613e0bed1ba6069e5ba1532cf67ee0576871b","tarball":"https://registry.npmjs.org/gapitoken/-/gapitoken-0.0.3.tgz","integrity":"sha512-arzuxLg5PYVyD2XjAFT5wrfIWKnhbuhaBzCOB9hNeQXHl25C5uQI+sd7MuMFQnnDaHpLNhBMBIQPkHImGVYaAA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcHKUtdE7HDPPZPN40L12HMiriJIN3DPVOuz8iewvgSgIgdBkdeC+5o9RSHHdKqz9qmmu4I/N8M6ZeTuLv033UPJc="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"bsphere","email":"gbenhaim@gmail.com"},"maintainers":[{"name":"bsphere","email":"gbenhaim@gmail.com"}]},"0.1.0":{"name":"gapitoken","version":"0.1.0","description":"Node.js module for Google API service account authorization (Server to Server flow)","main":"gapitoken.js","repository":{"type":"git","url":"git://github.com/bsphere/node-gapitoken.git"},"keywords":["jwt","jws","google","api","token","service"],"author":{"name":"Gal Ben-Haim"},"license":"MIT","dependencies":{"jws":"0.0.2"},"bugs":{"url":"https://github.com/bsphere/node-gapitoken/issues"},"_id":"gapitoken@0.1.0","dist":{"shasum":"7f179092efc2bd65cd2c1cfb9561866d9d529781","tarball":"https://registry.npmjs.org/gapitoken/-/gapitoken-0.1.0.tgz","integrity":"sha512-qkSKS6d5U5y5JTE+8Ze3hA/6UWKTJsiB418exTYXcepzgQlLKVDbPc/o1k/e5m76R9ZagQgk6py4fwu8giTqIA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH4WYHGgbIiNHHX41+ORjXpiDGRzM4OTK/EjYV/l1brsAiEAt6hNBVF3s5kKtqI+5oASFsZ4wkUxOLTxN0kjcnCrZRE="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"bsphere","email":"gbenhaim@gmail.com"},"maintainers":[{"name":"bsphere","email":"gbenhaim@gmail.com"}]},"0.1.1":{"name":"gapitoken","version":"0.1.1","description":"Node.js module for Google API service account authorization (Server to Server flow)","main":"gapitoken.js","repository":{"type":"git","url":"git://github.com/bsphere/node-gapitoken.git"},"keywords":["jwt","jws","google","api","token","service"],"author":{"name":"Gal Ben-Haim"},"license":"MIT","dependencies":{"jws":"0.0.2"},"bugs":{"url":"https://github.com/bsphere/node-gapitoken/issues"},"homepage":"https://github.com/bsphere/node-gapitoken","_id":"gapitoken@0.1.1","dist":{"shasum":"a559436ecb1f329d38f5775aa8712872c3215db1","tarball":"https://registry.npmjs.org/gapitoken/-/gapitoken-0.1.1.tgz","integrity":"sha512-PiGRcdBF2EQ/i5ROOv/+JL0tqoiWFYCwU2OtD5lhZv3JEQEMX6crluzMGWVcyKfDLllNUn7cVf/H68KS0y/xRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDru1TU0hV5FUrtr8ZCHMa99ndQiKfPEJ4N4wFtAzNADQIgCoi1EltwQv57A8/aHYuy0ykeVE9LbjSi1T/34dtCkcA="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"bsphere","email":"gbenhaim@gmail.com"},"maintainers":[{"name":"bsphere","email":"gbenhaim@gmail.com"}]},"0.1.2":{"name":"gapitoken","version":"0.1.2","description":"Node.js module for Google API service account authorization (Server to Server flow)","main":"gapitoken.js","repository":{"type":"git","url":"git://github.com/bsphere/node-gapitoken.git"},"keywords":["jwt","jws","google","api","token","service"],"author":{"name":"Gal Ben-Haim"},"license":"MIT","dependencies":{"jws":"0.0.2"},"bugs":{"url":"https://github.com/bsphere/node-gapitoken/issues"},"homepage":"https://github.com/bsphere/node-gapitoken","_id":"gapitoken@0.1.2","dist":{"shasum":"5ce4c2ee8e147eb5afb1c0beed119a664067a4e8","tarball":"https://registry.npmjs.org/gapitoken/-/gapitoken-0.1.2.tgz","integrity":"sha512-GJav3hLY0ElXAqU1t6Yl2AARpmCyOzdv5jbfVpmScl2avIXew/jz9+4m9+AgTC/XTekhILDtv9Zw1JHEKAQplg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDmXM4gclcOwNuiXzFn6JZBs5HpwS5QB2tvR3etj+HHcAiA57hWAUj33eOM51nzRAbeyEzZ/Cc4h1ypqPeU62k7iOg=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"bsphere","email":"gbenhaim@gmail.com"},"maintainers":[{"name":"bsphere","email":"gbenhaim@gmail.com"}]},"0.1.3":{"name":"gapitoken","version":"0.1.3","description":"Node.js module for Google API service account authorization (Server to Server flow)","main":"gapitoken.js","repository":{"type":"git","url":"git://github.com/bsphere/node-gapitoken.git"},"keywords":["jwt","jws","google","api","token","service"],"author":{"name":"Gal Ben-Haim"},"license":"MIT","dependencies":{"jws":"0.0.2"},"bugs":{"url":"https://github.com/bsphere/node-gapitoken/issues"},"homepage":"https://github.com/bsphere/node-gapitoken","_id":"gapitoken@0.1.3","dist":{"shasum":"b873f1172603d043f930a71a0a4846330f385b41","tarball":"https://registry.npmjs.org/gapitoken/-/gapitoken-0.1.3.tgz","integrity":"sha512-/i9ObBXukqacZBoi75zJg7WazmuJH8yzLUC65WaCx6EGG5/HsG3QXFi7Sv8QT1zQKav/i6qozf8BVkAdinlVpA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDr4qVpBwXDj2sky/dwtEy0CJEaCYW5zupcAwtEPZUyjwIhAPES52OkcaZptFSVibx2ruFRgWBR2ZLlizspIiXqrV/W"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"bsphere","email":"gbenhaim@gmail.com"},"maintainers":[{"name":"bsphere","email":"gbenhaim@gmail.com"}]},"0.1.4":{"name":"gapitoken","version":"0.1.4","description":"Node.js module for Google API service account authorization (Server to Server flow)","main":"gapitoken.js","repository":{"type":"git","url":"git://github.com/bsphere/node-gapitoken.git"},"keywords":["jwt","jws","google","api","token","service"],"author":{"name":"Gal Ben-Haim"},"license":"MIT","dependencies":{"jws":"0.0.2","request":"^2.54.0"},"gitHead":"85db3398a4848a2513485a50742ffcd0b5601e09","bugs":{"url":"https://github.com/bsphere/node-gapitoken/issues"},"homepage":"https://github.com/bsphere/node-gapitoken","_id":"gapitoken@0.1.4","scripts":{},"_shasum":"643dedb26cb142466f62b73d2782e7822a6f1ad8","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"bsphere","email":"gbenhaim@gmail.com"},"maintainers":[{"name":"bsphere","email":"gbenhaim@gmail.com"}],"dist":{"shasum":"643dedb26cb142466f62b73d2782e7822a6f1ad8","tarball":"https://registry.npmjs.org/gapitoken/-/gapitoken-0.1.4.tgz","integrity":"sha512-N8+W8KTDYakHXSqm/6rCs+8ic8QS1EC4oK9J+Aqv+bxhu1tDffV9A710rngm1Q/Tzr89VHZiCTOXuVnwGUHfsw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnXq81q3rRU9NlVJ/hSu7PIcdR+gQ+sfNc8jr9GSgoEgIhAJNdFHtevIxVUL5BUP49OxgkQvksM+nyNgQIXZB6hJ/k"}]}},"0.1.5":{"name":"gapitoken","version":"0.1.5","description":"Node.js module for Google API service account authorization (Server to Server flow)","main":"gapitoken.js","repository":{"type":"git","url":"git://github.com/bsphere/node-gapitoken.git"},"keywords":["jwt","jws","google","api","token","service"],"author":{"name":"Gal Ben-Haim"},"license":"MIT","dependencies":{"jws":"~3.0.0","request":"^2.54.0"},"devDependencies":{"mocha":"^2.2.5"},"scripts":{"test":"mocha test"},"gitHead":"d37c44d90b7b212ddc5fa74f3daa3e8a13583ca9","bugs":{"url":"https://github.com/bsphere/node-gapitoken/issues"},"homepage":"https://github.com/bsphere/node-gapitoken","_id":"gapitoken@0.1.5","_shasum":"3577fcfb5426be3a7b8ebada92671229d8cc81ce","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"bsphere","email":"gbenhaim@gmail.com"},"maintainers":[{"name":"bsphere","email":"gbenhaim@gmail.com"}],"dist":{"shasum":"3577fcfb5426be3a7b8ebada92671229d8cc81ce","tarball":"https://registry.npmjs.org/gapitoken/-/gapitoken-0.1.5.tgz","integrity":"sha512-DmqSnPk0Zy5H2yEe/4FeY6rWsIO2s8Dpnn4EqrN0ZfVI4D1QoCHKfy9Vz0YxMLW25Jivp33MDCyWS6nnwBAGEw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDgkFzp+P67pV8HzHf+9PG6f6pbDj5lAkefjN4OXZLpbAiEAj8am+k0zPd9b6tZq5VqX+kgIEyLVZqz2jLWO7RKMXQs="}]}}},"readme":"node-gapitoken\n==============\n\nNode.js module for Google API service account authorization (Server to Server flow). \n\n[![Build Status](https://travis-ci.org/bsphere/node-gapitoken.svg)](https://travis-ci.org/bsphere/node-gapitoken)\n\n\nInstallation\n------------\n\n\tnpm install gapitoken\n\t\nUsage\n-----\n\n    var GAPI = require('gapitoken');\n \n    var gapi = new GAPI({\n        iss: 'service account email address from Google API console',\n        scope: 'space delimited list of requested scopes',\n        keyFile: 'path to private_key.pem'\n    }, function(err) {\n       if (err) { return console.log(err); }\n \n       gapi.getToken(function(err, token) {\n           if (err) { return console.log(err); }\n           console.log(token);\n       });     \n    });\n\nAnother option is to pass the private key as a string\n\n    var key = \"-----BEGIN RSA PRIVATE KEY-----\\n\\\n    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\n\\\n    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\n\\\n    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\n\\\n    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\n\\\n    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\n\\\n    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\n\\\n    -----END RSA PRIVATE KEY-----\";\n\n    var gapi = new GAPI({\n        iss: 'service account email address from Google API console',\n        scope: 'space delimited list of requested scopes',\n        key: key\n    }, function() {\n       gapi.getToken(function(err, token) {\n           if (err) { return console.log(err); }\n           console.log(token);\n       });     \n    });\n\n    \n* for using node-gapitoken to access Google Cloud Storage see https://github.com/bsphere/node-gcs\n\nCreating a Private key file\n---------------------------\n\n1) Login to Google API Console, and under \"API Access\" create a \"service account\" for your project.\n\n2) Download the .p12 private key file\n\n3) Convert the .p12 file to .pem: `openssl pkcs12 -in key.p12 -out key.pem -nocerts`\n\nNOTE: You must set a passphrase for the .pem file\n\n4) Remove the passphrase from the .pem file: `openssl rsa -in key.pem -out key.pem`\n","maintainers":[{"name":"bsphere","email":"gbenhaim@gmail.com"}],"time":{"modified":"2022-06-18T04:53:16.253Z","created":"2013-01-28T21:34:00.291Z","0.0.1":"2013-01-28T21:34:02.961Z","0.0.2":"2013-03-15T07:17:49.361Z","0.0.3":"2013-06-16T06:40:10.152Z","0.1.0":"2013-08-20T09:31:05.378Z","0.1.1":"2014-03-19T19:13:20.322Z","0.1.2":"2014-03-19T19:17:59.460Z","0.1.3":"2014-03-23T09:47:10.222Z","0.1.4":"2015-04-07T13:49:26.384Z","0.1.5":"2015-07-29T07:23:52.127Z"},"author":{"name":"Gal Ben-Haim"},"repository":{"type":"git","url":"git://github.com/bsphere/node-gapitoken.git"},"homepage":"https://github.com/bsphere/node-gapitoken","keywords":["jwt","jws","google","api","token","service"],"bugs":{"url":"https://github.com/bsphere/node-gapitoken/issues"},"license":"MIT","readmeFilename":"README.md"}