{"_id":"@rockr/sso","_rev":"87-fc470e6e01f321a8c960ada7bdcf1797","name":"@rockr/sso","dist-tags":{"latest":"1.1.0","beta":"1.0.10-beta.3","alpha":"2.0.35-alpha1"},"versions":{"1.0.0":{"name":"@rockr/sso","author":{"name":"Rock Content"},"version":"1.0.0","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*"},"keywords":[],"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"ab5bc9db95bda11e7bf433d53faf62ab2a6ffdc0","_id":"@rockr/sso@1.0.0","_nodeVersion":"10.24.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-L57i/kYSxHL+iqFu13fB4Oewd7wZLX3nXmdukZAbIT46lCfzQKK/NI/UVFxmoccFpbswDWdwx5n4HyMElgvgkA==","shasum":"4da7851b2038543b1f3ef0fdfd186f6e899eb5c3","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.0.tgz","fileCount":41,"unpackedSize":107886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbHH/CRA9TVsSAnZWagAA1REQAJpxq2Yxu46TbTSFx4fm\nQW7yPSv9ARtlz8Yc4m0IyqnT9FbH8eaapKHclHh2KyP2ZbpgEY+LRZR9dHjp\ne9BFQeXMzoYI71WuPBoTlA2UE3ikrzXtTXY0Am+wN3zEir45gevEtRE+Ijai\nXf3Ww+H0b7zBQ0IvYMqMn+wDoilQsSzCciScfjsYTLij+4ZmfsScEGBFWe48\nf8conLVIL3lMSbjJDPHSJoKRBJwgj8ZnBIldQzPgpNGGvW3YAKyrY9aZuFPu\nxTTv2wAwiSygFY2rkPs3Ny5ktjqnpF/J8W+dBu/Gpgvry7NX1cJkTfTUWdrd\nhtTgs1ANlSR1XuySyd+rzCbaTZjs7HV2MRC6OxKjg97sxTOHNNIDMQOvXd10\nKhWuc6vSsbcImzHz/RaP2jDM6wVYknT6U4QdWvUdxIGJ4pUax1sypL1cQRIj\nRW8B97Sy7esur8JNGFnaJw9XWDE2vdbZ5YuMDOzzsiXmHEKBcXW8dlkliD2o\n/tvvFn34SqYuyz/MwCmLBEOcCBOqVJ+USbZaFPKDFXY+15bzw+RCpG2Sscyr\nUF3YKEAtnGONhLq/B/wWuXRR/+z8RiRjMOdX/omJ1SCug6pj994N5LwcOxr1\nOKhD1w5lgc7Lpnji8jHA9lB+eaeEGF0ODLAvcKKwnyQVhLgks55eXVtLRG7V\nCwbO\r\n=W8Gx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEOVPPnCDl6Dwdve+pPKlRH/OD0xfDpx3en1vKs3/bzWAiBUA/tXUqh/kVhqoVBQ0tI292SrTdPjEzG3HnBtvMzPiA=="}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"otavio_capila_rock_content","email":"otavio.capila@rockcontent.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.0_1617719806549_0.8507329766118181"},"_hasShrinkwrap":false},"1.0.1":{"name":"@rockr/sso","version":"1.0.1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"b067c46a0bd3f24d7ba71b5af0bede197d86cb9b","_id":"@rockr/sso@1.0.1","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-oyjRrvHalNH+eW0U9SQaqJ56lVXCencpOQbvHu6xfRJ+8TIu9fdrxTgXC5n/YTOavP+qrKXFeXwJuG6WTEbjZw==","shasum":"e63fb5386d481b2369f2d0af2aa9dc247767874c","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.1.tgz","fileCount":46,"unpackedSize":108729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHmFUCRA9TVsSAnZWagAAakYP/0/J/rYRt99LlieuYydI\nryGpnzo0FG24bHgq8vbrSrw6uUPaRbVM16fP1Fs4xgjY3zni6PaiU0KQzGjE\nSB61skF4dQF2R8iAEPyzSTA6rGycyForwKMmF14iyfbmYxT6EgU9rPQCFslU\nSrr5ImSB/mkKgCIxzaQqGA7i3CgRYo6Vg0piBzWFuxUwvp8g9rqkhEXfZZy2\n+6JkUTGF4ZO/YxZgu+YOVEDFax5povgNA6rsvD/hF1dtQo6OSqqCwVsS9YwK\nhRnmnaOYmq4A8L+RkOC8m/EoE69aqLMfNBqe2GJLXoBSNlyQ7yFbj0XjU811\nYX0iYY2/+NYwBhGC/6WeKqbZUBynzn0mZiekUBTbFb1v3ozFmwsLKdiMcpPs\nujPMKN+K0lpcFsZ1kjJK/JOCAPU6O2E/PdlASEXQg052cukIvRvedlbb1YCs\nVqLZIMKx2AFa4E9eWUj4bmjV8mTYSm0dsKZEarf666+h/B+ryR6aFf8b9c2E\nAHfUfztdwJgKbMF4LmUIWcQYWEnrnhIJHLZ5sdisQC2i/mx91TQU8Ty/OJUJ\np5WHmwoGUsSkolI0qRdxyY+En/DiDOqRXlwAfnLrK/gOYNZ+Sdf0tg7OUNmZ\nKFuaZYJPFs48UR5OtXZfulhqGpoEueFSxKWFP292smaR9ZDCR7wk4YuL7aqT\nH1oJ\r\n=akbr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGdGZsO+i3b2hIl25ZLQASUTIs5p2A+EctBrAcs2WgiXAiEA5vhtmEq9KFST4o80zYg6tlTa3xNuohtLT1QwiBl9WLU="}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"otavio_capila_rock_content","email":"otavio.capila@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.1_1629380948470_0.1241892980364403"},"_hasShrinkwrap":false},"1.0.2":{"name":"@rockr/sso","version":"1.0.2","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"d00e9729a8ccff184d00d940014cafa65c879a14","_id":"@rockr/sso@1.0.2","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-F8L+TJSAxPkkUZIap0zEuYTtjUEQwHvt/ZnsAyrP342gvlJvMYKQygfGJ7NNrIih376lrYcmKiWWXoz1gvK6Vw==","shasum":"e0d2a319083c96d0d5675aac34664fd88ef3acf8","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.2.tgz","fileCount":46,"unpackedSize":111424,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCex3vholqo0ZKMXAYyoghEdjC+WUUmadZWzeYyoPwpOwIgYp+LK/7QIvucAZfilTBuFzBUOV4yw4UW3BGQWdnlMYo="}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"otavio_capila_rock_content","email":"otavio.capila@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.2_1634253064996_0.017493924106781966"},"_hasShrinkwrap":false},"1.0.3":{"name":"@rockr/sso","version":"1.0.3","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"3a59733622f69d0e270cc49b911120d149901120","_id":"@rockr/sso@1.0.3","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-FxqqNeC1s/XZmV/eAcgBCcVZ5VWymzIaa5JjoutW9TOHCdehN749+pO09958qyPBMWUV/HrQw2T+KIVVJ4iq8Q==","shasum":"0b6730ed73e8a82f43baf0a744f4f9a2f3da5f71","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.3.tgz","fileCount":46,"unpackedSize":111476,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1yNXfCLJVNUz8IFkJ4Ch2axnLCDCp0eSN9952ax5p6gIhANexuwOaoTwubg/ISS4MH1Tp1fCd/WAxQeEBLTFsR8ea"}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"otavio_capila_rock_content","email":"otavio.capila@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.3_1634254771659_0.29019576714427986"},"_hasShrinkwrap":false},"1.0.4":{"name":"@rockr/sso","version":"1.0.4","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"c5d8149113220ec4eee19b1c2bfe794182e6eeed","_id":"@rockr/sso@1.0.4","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-lH4KdIO+lDdQ5Q8Qa/3V2iqYEZJ7Oojo9yRYpdzcQN19dJBUxmSvz4JIbWUjw51DD7XnrpzR0n5aAxbGvUYHgQ==","shasum":"e4653581e21963ec6449f372873386628e0cec6f","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.4.tgz","fileCount":46,"unpackedSize":111674,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxOEeDTSnIOLhfJO/tsXhrm6Hf3F70px8sZ27Jn3NtGQIgbMj5fZLgSql7ZihqijShM2oX77j8Mb+ZMyPVQLYcPaI="}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"otavio_capila_rock_content","email":"otavio.capila@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.4_1634255092179_0.48092795964038504"},"_hasShrinkwrap":false},"1.0.5":{"name":"@rockr/sso","version":"1.0.5","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"aeffd6331640dc1050d441db3d51a9dc819ce6bc","_id":"@rockr/sso@1.0.5","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-UrXFJTcGFobeh4T6IX6TU2iXpclVJtKY3o9h6wSMLcpdS21Nv3JEQU0jZem885s2/jBWPsLCgREPhxpG78KzJQ==","shasum":"75723964e635dc61ca2fc643818dcc04d325c3a6","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.5.tgz","fileCount":46,"unpackedSize":111862,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAXpNpoasc4Lue5Pawa0vvA6yUyliIstufLfYNLVmW73AiBaw7Uo5Anb3TVn+XQ7pZ8Jh6NAi0iLT0o50Yo41SgwMA=="}]},"_npmUser":{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},"directories":{},"maintainers":[{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"otavio_capila_rock_content","email":"otavio.capila@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.5_1634327408611_0.8040000826569116"},"_hasShrinkwrap":false},"1.0.6":{"name":"@rockr/sso","version":"1.0.6","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"2f12b7138e4afc02ae2f2697b014289a5ba1d154","_id":"@rockr/sso@1.0.6","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-X5mqG/h97vJzSM+kW66fQ65gWpTbL1cfUgpjsVP+06fAhpfeBcOwv5N8Jv0rpy2pipek5eST/dBvlRS4I6kd/g==","shasum":"3ee4d064820c5fe674f6b2ccc77c262bd9521795","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.6.tgz","fileCount":43,"unpackedSize":43004,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE7n1U6BvQpDfdv0yuDHGR63Rw+WcHo9u1iWwKIXYJAeAiEA439QDlDvgNJtjy5FoPH0PpasslDabROkru8dkUyvk2g="}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.6_1634763383364_0.8023090211018478"},"_hasShrinkwrap":false},"1.0.7":{"name":"@rockr/sso","version":"1.0.7","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"2f12b7138e4afc02ae2f2697b014289a5ba1d154","_id":"@rockr/sso@1.0.7","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-F+RWwN02eG4aawhCQZWcq3wNI0VIZ0qqmvOJe7XuQmXPqXWocdKUgEz3CYWkTkSxu2iOTtNwi5ySPy0U9jmk6g==","shasum":"ce016b8b69a66e2d29e2fbe266f4956ea2a1b383","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.7.tgz","fileCount":46,"unpackedSize":111978,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIArb6TbS03PAgpbMN96qr7sYdWJic249oYgkoksm7sQcAiA4/EPvl03ZLBIQyUTmsePPLcr7vvkPDSZyCv17YFD/XQ=="}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.7_1634769904416_0.23928147902161623"},"_hasShrinkwrap":false},"1.0.8":{"name":"@rockr/sso","version":"1.0.8","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"11b0ac222825470303e14576563912ac77534251","_id":"@rockr/sso@1.0.8","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-QqqphKwoAh0WiCyyIktZpTrYV5KEjXvIoqnd2v5Sq1nj5fViHo2iv9JB1I851QECCQyCVH0iiAkLuWSFsBIZ5g==","shasum":"f2df1bd0866949c6322a8d02ca7fd279cefe0884","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.8.tgz","fileCount":46,"unpackedSize":111861,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGhbgfv4oGekjiclFnBUaWtzZiPCQcXCUOQ/a+msD0Y4AiBxyeUHiHh02lQ3oDF/kE5zmq/T9HsnE3sJ5cPHQbqMrQ=="}]},"_npmUser":{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},"directories":{},"maintainers":[{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.8_1634819005323_0.21957856950047572"},"_hasShrinkwrap":false},"1.0.9":{"name":"@rockr/sso","version":"1.0.9","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"d12e6492a5b061ca98af11cc336e6f8da74f0182","_id":"@rockr/sso@1.0.9","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-E+cP/DhrYhSWxrZbUwqogzrqZrgV9o0kfTMKCMnB5G6S1FOV8kpS3ZBtSN7VsJlDIX8U5nFe6Wn9luCa0Us1+Q==","shasum":"f22144015c8ebdab19ca1bbe6dafe51a77dc911b","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.9.tgz","fileCount":46,"unpackedSize":111968,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGaF/sUMNa4lniUsdGhEMm4omtj/ud/PF8s4FTtNBAx8AiEA9R+gdG90bzGkohkSV5ta9PP6aINKl9vM0VBxPUhLZuo="}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.9_1634825284518_0.8744759571998268"},"_hasShrinkwrap":false},"1.0.9-beta.0":{"name":"@rockr/sso","version":"1.0.9-beta.0","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n","readmeFilename":"README.md","gitHead":"4853bbed7b16f58f3eeb450351be5d4947034044","_id":"@rockr/sso@1.0.9-beta.0","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-bYeW1+aCCwsEm5K9iotXRKCY3FhuafsBypPr7DyPEAmkZ1Rch4RcAwHo837XTXLu1jhtrX15GvYcxy2XbkeYVA==","shasum":"2cd3f42147880ac330a8be3c621641ad5b840635","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.9-beta.0.tgz","fileCount":46,"unpackedSize":112098,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDHBO73V7GYtK04qqUKQC9OEtgsC+7JMiBzINVaPFgtIAiEAp0Ulnid9u2Nn1V0wy5IfbL1ah9uNP9GQbG91lUEnvto="}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.9-beta.0_1636033231207_0.7770040737603054"},"_hasShrinkwrap":false},"1.0.10-beta.0":{"name":"@rockr/sso","version":"1.0.10-beta.0","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n","readmeFilename":"README.md","gitHead":"6787693f175631b78ad7b7ee0d7e8272f2932e75","_id":"@rockr/sso@1.0.10-beta.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-9krh9FrsuaBOWG9mJllswHMbMkTZ7S8zAdrH2oxnzy66jS/EIdfdpNgmPG+EOkjCMDmv7dGRAmlZ5XDMlGbmFQ==","shasum":"1ec89a3d08106f2fdf4f0c4fad204dd80c316629","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.10-beta.0.tgz","fileCount":46,"unpackedSize":114510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4JBlCRA9TVsSAnZWagAAXdoP/iQlp6TjCH62hP+Z6jph\nsAHpCgnAI1OSPA7euiLWl12/NERUfgtAXsRt3YvG0A1W1G4jLuUt8sPK8Fut\n/WRXWkVhUru9iHg4kroY+icx37MHCWr0FRtDnyWK0bXml+gZ2yLwQ/qfkaaM\nsBpbI1x93fZVvaynY6OkOxmql1qgXsTLgU+8zoDCf65pLUw7dRN0ksWhThLE\nwr3Krah1wRQTXDg8t/VzNZTzRdyaGq7XDYNKhxvBsU7RGERdEuK/9uovxcE5\noPzJqiRKGFwbSImSCDGwToA4HZjzWjw0VuVasuy7qJ9w2Z2lGv63Dm5nEmFA\noDLbkbigtCK0lRgTa3M55Q61+XG+IWT/nF7SMmb/vShTCnaOW7ADSk6L+aBh\nPt2RUzSyIxzlTPTqQgMfEpZOYmONX8xrKcuOVSu555vV0G80VTiDuItjr2f5\nWz9I4JyyP6XAxmc80QxpG3yT2j/DhEJCNMntnNXl5RCJSCMUJPB/Hjvjf4gJ\nD9y1Gwg96QjE/10qShIz+eqBD8vCPywttKRkvqjt0rqtj8i/9OXmgQASNeWC\n+nisYPOZ3q9+p4m9vbmI9dqf6PxLa60gdlbrd6bDiquxmo74S9tfFOu8JXoU\nP9+WDVRRRCa4BTMVtWcpQO9mlzr6ZSEfUnlOFOVJZxWhFzFGS+cDTE2+NQ/6\nNVGR\r\n=WGdU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBhw46WcwZ0PfOX6maVkH2CrCcBRG4oyfCdlHAkkavrMAiEAtLn9g+RLBi2iFwHpToUeyMvBG7lUBd+M7Tr2lkZ3SX8="}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.10-beta.0_1642106981655_0.2811888979496293"},"_hasShrinkwrap":false},"1.0.10-beta.1":{"name":"@rockr/sso","version":"1.0.10-beta.1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n","readmeFilename":"README.md","gitHead":"8fe4f4731f13fc599b8237707af91198ccd5026f","_id":"@rockr/sso@1.0.10-beta.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-mEwCqV4BXnDmUpZkjra5rnorvEtGfi1RwBszhWVteAniJ1XvIySMOqt+5bzgsBu5HMafLz0uQ8GuMzBIHWkQNQ==","shasum":"559768cef38bcea070755826ec652dc0dc930621","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.10-beta.1.tgz","fileCount":46,"unpackedSize":114510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4Jz7CRA9TVsSAnZWagAACjsP/AuiiFkWBk3CJ284jnh0\njsFVhYRzJJFqJjg9zRcNLWE/URTz3xv9xFkvmDTM5g0MV0ZSoDgJFyp9pxkg\nuCdiWaKkRbOF3zrb5t3G00H09W1+TtauM9TcIDY7uMLS0E/sEaIxJKNQ3ubl\nAndQEBdxDmG1/r8ZVwBmzJpj8VIgyfSrCubO7H1bVw9XAIz/e1lav1hncs+h\nRA2OOR+n9FXOibYg+YxZhK+xE/zC918FlE1jsWSLG0wWBGJhbsxhkF1OjgWF\n1SJlt57tM6KIVmX9gek6nquDUxxhE9YAlB4qk1YPd4OF/MAGgrlBVNURqWA/\nL+Sg0ic4LxY0xDIuELH6EAmMuSJ0ndyrM08ZytEGpGgmKH22ZrPl10dKwOQD\nM+TQhLhgapcUb6OHIm38PAUDxjr/kN/jRl1W96oKvVbjLtTt5Hc2OYybxYb3\nlmGDYhqa/t8g6/Mg8mdx0N6AEGUTf4vJC46aQRupmP2vFZ217OQFZCaG/Ouc\n8/CPBraZL1xeW6131zbI1d2ddBq1GkkX5hVeDU/aFY3OtifM8AslVSwlLyXj\nr20qghsNhlsdpCPeKyrWkYkfkKKzDA3Sq0ZuaQWq5oLm60itmpss3npm9Rqd\niyQ6icQoPBlN0CnJFEz1jqb3OUhYXosfTEqzdB6Mbrmj6v/ZVdf+3lpGLRsy\nJGMS\r\n=MQKF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDqHCK31JLpjwf6XItbGXZNP/BefdNFmavCmbZ/gmvDXAiAZ5dgGOpqnFWDlg3u72D9EnvxCVrVx71vGi0DcfgABJA=="}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.10-beta.1_1642110203091_0.6352946434458171"},"_hasShrinkwrap":false},"1.0.10-beta.2":{"name":"@rockr/sso","version":"1.0.10-beta.2","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n","readmeFilename":"README.md","gitHead":"2444b58a6e21452bf3d6be679125e3dd6b891507","_id":"@rockr/sso@1.0.10-beta.2","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-X6UzNrlucHEVXEz8mrCPtniXImzW210yFPQ2k/Xuji9eAO+IqMo5WGocMOHuMswazpFFxr1JhSFuoVoLoh+Q9A==","shasum":"6a84c28d858aa938ceef71f39ece8c55108238a1","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.10-beta.2.tgz","fileCount":46,"unpackedSize":114530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4XzgCRA9TVsSAnZWagAAuq0P+wdGw/AKu3nI4RFpCqDB\nt87NegTXYzBe3KhBuhTU97g5Z+ytBvMU9qvx+zUSQhJHaCNrQjW5f6rTYtFR\nqjb6Lcsvg3A+2q4VWnOMDvnogkU5FQHJhOHd5EiBZMAUFxRVoEq6M62IpHsp\nmuLt/HIENNMODWmmK8ARrcCBYvCpuDowqFIBfayUH1GsjccVarip3uGBI3Uo\n0kRzsYCj1B39JYErL3bf+VTMI1M7GMEznhISGJnHdzqD6oSzVvpzSF6USJe1\nXQ8bOUV0nW0zZjXn4iJju6OrPeOzIW0li6vbGP4y8QSStW8GsHc6hIKzJkwg\nTPUP97jz0m7b9O66RyJq/lZkn1QS1yFFxk97F7ugVmv2kYX6tIh4QZlNwYI4\nm+UNslOKUy4egKIRzTUo0VGBjQ1xpJ4476HCkkc8o+L2QMnt/XOCYqrxsaoD\nUWCsns+9fi5ewyvj6c1TElB+gjaONNra3oAF7scCmEScnVLrwv77ij0xFCgX\nwCV5elJHRToxwJDXQaoi4JEeWa3LbTzmZTE9Uf3VM3bZSSWoaMVqQe2h5Mfl\nBp0xR5fuC9vVBpuMqiFs8pJF18J2M/q+UeTxQskKXearPd4OWkpFUlgHMgG1\nq5YSt/kZdNEwlXdzgzf0hPn6JaylTazaME56dt3+K/2JgOoKphJ/qnKIG8cI\nnedb\r\n=ENvY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLAoe5To7L4U+bANOM+XHyav202Y18UsyM6boA26iJIQIhALmGDpWtqQ0KuE/zT+wItALLOD6HPMGjWRTm+WLOfC9+"}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.10-beta.2_1642167519865_0.3142423817865181"},"_hasShrinkwrap":false},"1.0.10-beta.3":{"name":"@rockr/sso","version":"1.0.10-beta.3","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n","readmeFilename":"README.md","gitHead":"45091f3166f10068abb2e66e95c8ae3ed7ad3bdb","_id":"@rockr/sso@1.0.10-beta.3","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-VdB+mJgZlCkVqF5rd3wzC4f6dcURdgim5p7bIbsEFc0yeOQKDpLdKgTYYkmZ0HRcRDzq4rkNtWOuLgUJ9dth1A==","shasum":"7b75b41672912f23bfe88192a7c862aba828bd40","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.10-beta.3.tgz","fileCount":46,"unpackedSize":114513,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5xL3CRA9TVsSAnZWagAAuh0P/jHtpdejYYoyudZj6fom\ne8PBwefTYLREO6DHv1hAyTtSHVmk4DSPqRrJJSOZAtDG5zzLaqSk+NOfUTOB\nt13eMSwbtPLPvCIaDFUUolfJX2pMkb0jzSy+tXC6+5Pz273hvURYa8KNcXX/\n9k29dl/dbDaX9zx50RUsshh5qjffZNbpqeaBrhewB0N9k/ZRDepIgiB21ydJ\n2z/D1f//KcTDtQEyAlofHUZzyg4pJ0hmDHZLhMzwuEv6P7NmIwrHIwv12tnn\ng6v7kdml0Y3Ipd78y73OCUADOLo5+PMH69jeKrlCBb82LaLg0LDynzD/mPTp\nlzPKkl/eX4Y70cLqCs0zXrKg/YuP/72JD+n9KsITiRUqikwJSZyILMExdBpY\nBXTcN5B0HWHO7AIXkjFh2CSCHuXo0OFcQnR3CikuuB5G8mNaeH0I3cJ7PTDS\njJ1ACkzt9ip7e4pWOYv5GQQcj0fQeZNlNtOpW7/MXiJ40NLwRakek0eZj47/\ncuN8mJaX9Tz+aQ7h1SLHE2RZojf6WMKHDJDI4YDjUJ3wy5Zkjqu0B6BbtcBz\nZhDp2lbyPR01mW6YkJQaSYUaSYDWno9C8Kcw0RBlszYARPhudRk4J9lYOtYk\nq8C63N3awyiCCaILhO1JZdMf/ELuTnjg+Y8/D+KWyX693gFbXTpNAcQQk//i\nGj1G\r\n=L99c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwGIhQCHkrcwbILALjbzDXm0MGENjYFsGnE+StqBhsUwIhALeZZ30nxADuzzUJb+74qbCl3Ejim8qCVeDOKr2bcvFy"}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"leonardo_vargas_rock_content","email":"leonardo.vargas@rockcontent.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.10-beta.3_1642533623474_0.3769029424228518"},"_hasShrinkwrap":false},"1.0.10":{"name":"@rockr/sso","version":"1.0.10","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"types":"./dist/index.d.ts","gitHead":"e5e41dbd1704ffdafae2507786f7a0635a77453e","_id":"@rockr/sso@1.0.10","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-atTJDdckxRPZw4qSEiNUKUyKqEKvo/I/T6B1e0RBlDeODw8jTyj1nGcwEYT9sgZ9GizOzcrM7wBkdABfqiJM7A==","shasum":"b665adadfd1cf66a5cd1246d847d3a554355b970","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.10.tgz","fileCount":46,"unpackedSize":114506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+DZ2CRA9TVsSAnZWagAAmacP/1XeRg86i2MOB6zpoulc\nvT+8lq8bhdQEn+F+9bse87avNUTBzSyPX5alcH6W0wThlNeRalp2GceCrJUM\nIr3noDqf2jZiQisOO7E199F6/B7WKfGVgiDp3LOnmU20gdfnMpqOserkMpuh\nJRooPByUUl1HpSfcNATjgqPilmRJtZRjmvT8nQ7kJQcBrkzHAmsbLplEc9g7\n5kJjpA3oRqYDRuphynS2vYEV88MyEbFtLINaqqmX7UlGPk0RIApOY0+zWc1d\nBvbbOtdy7XpAeySjxCo8JYpQrNSJ331UrPRi9AEVRdRzF1sdIXAHsgQzGRHo\np7SjRNtJO8HUrGSqzY+fOUpV5exMN5+Cr5eKby11sDmtbPYW9PAxNzQadFi3\nf1JuyYg50Jh6yjSAtxdgw/OSngI7B3oQdNZUgKL0axYfxfHfnDPeRLl7t9ZF\n5qndI/YiKYJVzOZvxp7aXfBO9vZ/pdmJ0+elXWv5VGwQmW4uNaJ7UX54nN9L\n5HTmutwxDvCXB/OynJvWd72RZWtmI/7XlBCWzfjp1N+bd324vwu96/JnwFaR\n52vQZuTpM5iMretezD7nX1PfQNlSiYsTA/N7wNlyrwY3oXEb/m2iGztvfopU\n1Vxzgu7spVnEvIuv7xOwotGO6n9S2RNMOCJBqrfw+tpFD+5bP9AKhiftGo3j\ngAuL\r\n=jAU4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC+SA/NOq7anGdcn6tAMXExfd5mhYMAjBpdVpzMfJIQ8AiAum+wcCIY5geP8p6of6x0uc/aB+VjpbvHYNFKOxD1+SQ=="}]},"_npmUser":{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},"directories":{},"maintainers":[{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.10_1643656822843_0.9526840726570627"},"_hasShrinkwrap":false},"1.0.11":{"name":"@rockr/sso","version":"1.0.11","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"e6acaceffd72653b8beb0532bb3dcec5d0ea0865","_id":"@rockr/sso@1.0.11","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-clgedwpFU9N4nu8fupS+6ban0dxfjCcYZ02QJJe/cyuIQ7oUZsSmiGz4XvGySD3JTEBNghCU05rzWdDnoNlnlA==","shasum":"e436a87d2952f0535d2d91ce793f7896a58bb4e0","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.11.tgz","fileCount":46,"unpackedSize":114691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDpPtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpGqQ/+JEgRy43DtsjlZ/vilfZv8BrT0IblQnzCnQaLvjuavITFPJAB\r\nZOsTvLGVPe3NWm/4AHgNA+6l/J+K2N72LJlnBnPScPLtj16CH1A80J0kK3Hw\r\nLyXdOR4vW9QDUKO4QgGTF/RS1/6MMoilZqoXjMjx9ptYcrmh328k7ufbhhvc\r\n2yLTRnVbi/BFcKL9M6PwsJvd/81J++hcwBEINXSZYPTSpTcQhqyLWLxPgIFu\r\nq+sRyOl5zKMJBqUoXzWbCeRABC1rUgDUGCc2GX+yHbRro80nQdL8IEopCNzP\r\ne2ZdaChREQi5P42gnSdXzhL5m8OdhqfDyFl/Gybn4tvK+pz+XamuLDHXRf8f\r\n0C7qTxOVOJvV+7M06/xV98VIDR25Lx5CkzX7DctHzCEZYsyBkIELyTdCA3BN\r\nV4RPTR4x5H0HTaJoYUKh3RP3T7XZnNHW79dOBRKfiJHH8SoVmnbke3WrDU5/\r\niDa9VvaMVc+gKwgZ5tkgxKF7z2BNZUN1HlEx8Nd0tizOuP5Xc+EKBE/DU7uO\r\nljb97hUoZNIzqMTAI0VCncXYrA9ZgF6CQam0vOdPY4jMIqII2PH7yOqYeUBA\r\n176slv1BAOxPt9/EoOEDkjYe43J/IYZmy/SsOeP1zY9cyGNSS9o/fcG+HHFP\r\ndrNjdYqFSWqeobuzuIBdhgvCwk+mHGhe310=\r\n=d6wW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtayid4Yik1PCCrxn+8GZY8/O2ZtYaUF6iCqwST4P9aQIgEC9iBwte+qDBnCn+EG7lTqT7RFZu8ao4aO4VsKp9pQ0="}]},"_npmUser":{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},"directories":{},"maintainers":[{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.11_1645122541350_0.1604618148877115"},"_hasShrinkwrap":false},"1.0.12":{"name":"@rockr/sso","version":"1.0.12","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"3cd35474608fe314313c2c88d1537ab267dc02c5","_id":"@rockr/sso@1.0.12","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-vZ1H/D5aHb4oVRnQxoSC4cVmn80+t+X8tpKFM6E8kbr9thj3T/XrL84601fVXQpOaSiRJadVjkSd7FiEMcpVhg==","shasum":"89699ee57d670825df86dafdf97a5bcabfbd7053","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.12.tgz","fileCount":46,"unpackedSize":114602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiF7FKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQyhAAg+U9ydTYcZ2e1i887Xnkkg1ajqXTN12mQ/vF8TLqloVjHtNF\r\nz5L1V+vRTOdk3WIllM/vGRzZOujY1iNQoD4cYKHfBWbU3fYP7L88skydPCpe\r\ngFvT/5aqHUXEBLXO0sVH16W431q3MTlMxrF498RMB4X1U3+6ATC6EzKjL/b8\r\ny4IknG3HS/owWfoPE7Fo+ZngNwol9xxiJazAAKxcPc5AomZGAIlNXIVkdFn5\r\nndnJvEvcxoOfBxYqOw+dHTtcq9pSWywAv9t4RzAQVV9rh6Vh4SS5EAxvwdl0\r\n72MuklX6HLQ42VxBFekvPKgORxiiBna0ygw1CrlkaRzXv5glipiPT9SYXZQr\r\nB4X1T/qhudSFHd4E5kDgHva8vKw/anXRdEI2rmRHhkY+sWsZOIpHQhBwU2XS\r\naitNt+J0kKaTto2wTT8ZmIMXiKSQ1/G5RFh1usJ6kgftB2AYrVDAGXDmnKky\r\nCZHkLx9hi9eRgOw67jZMUG7uhv8K/qwE195o8er3F5Yy2RGLApFzTQ0aNZ9I\r\nPUtVAkcM6V0p5Cw++0lORnXPcj6h/Z3jSTKie3Eu/t5kvhilFF0+XeGmNK8A\r\nLvYDc6Nkrklfm9oeZiuzafGKmpQORuGvZzZsg/08aYKhHyWqyKZbwH4v/B/O\r\nfjkUuxST5Jl2JnqNar64RCXb1LcDObd2wKo=\r\n=hexs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkzp1+Af0avEvFWa04gaK0RrpL0FYZ6W0Mq6jfyOIA7gIgEo4KEDrQia76H7dUkSv74iFcJBRhrBtJ0GTGIM54iiI="}]},"_npmUser":{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},"directories":{},"maintainers":[{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.12_1645719882234_0.679206162755962"},"_hasShrinkwrap":false},"1.0.13":{"name":"@rockr/sso","version":"1.0.13","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"90cb3cb8d5e70eb9a190dbbefabecdc3e7abb759","_id":"@rockr/sso@1.0.13","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-LwTNqdMeVdZjbOyymyviyD5rJ3FPxSOKEpXTDldQO0zNA065Kwhe3R5xG2eBNYTPU5CNBbM6djOGRRC/FGEr5g==","shasum":"93c7ec7ee74b0d37ddfe68a242cc5deb9f1550b7","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.0.13.tgz","fileCount":46,"unpackedSize":114309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGDrgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqhlw//ZwZD/4K2+X46g736jQFitPqB1ZVq4Xd87553Lv6qVLu35c3N\r\nzOEAKDqRAbvx2Q/64A3fT8RmQDEbGTgqnVB0cSY+24FEjL9VUU5rA0EbTFt0\r\ni79hObgTk87eyL9+GYA/Is317XnjyILWrB3AfX7SQH4/AM5poBvN1MG+4ql3\r\nkbZhSW7TiQCpUpta1IDrMS2Q4sWh4eiiEUylJqiR/THWm8IUuMmP1yS7yrlb\r\ni43AOe+CgnyAclufh9mC/XnC27xwLWBOrrpnwQUZ7hxncEM0RMZuLuShGLl8\r\n5TUfaQv+V7zNr+iIW8cfv8rR/cDQLD8OSmZxImq4HecKJM1vi4ITUHWduofn\r\nL7BKOEvajiBPmJXq9YdVRjEXThW9PIDv80pTLTcBqx+sOItWy+AgN1G9K3N3\r\nMUZR/t9J3pbkzLO6RNMm+0fhhNiE7DBkMRbi3EA7DwEQO+KTmTU3xZFJ6owx\r\nVsHPqqXml15USgGVUe93kzMK0SvH+e1kl1slQju/xtAfPVs9f0pQN48uFRwS\r\nkj9kuiQFS9VYExJKip5DfuGa+nwVBkNS6Wn1h/1fzX9paTKCSOjjWEtBLyat\r\neJcRv6i2kwUQ8sKcMqeujrv4BgaFAGynqkN2YLE9Yy8I+4egn3heGrS6Zu/2\r\nsFPcsMeqfBIk+crz/fozqBTrb3fWGM8nARM=\r\n=S/2+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwUwm1Irol807+ojyYJ/VColyc6oGanhWT25zNl4W9mwIhAPGH58e92+jkr5uUeHGAlFyldUtMCBB67cDpRp0sOpS1"}]},"_npmUser":{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},"directories":{},"maintainers":[{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"zayit","email":"rodrigo@zayit.com.br"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"vitorfreitas","email":"vitorldfreitas@gmail.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.0.13_1645755104396_0.8208651463514165"},"_hasShrinkwrap":false},"1.1.0":{"name":"@rockr/sso","version":"1.1.0","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"gitHead":"452e8a90724e3b28347568d8752c6bc155fe3f0c","_id":"@rockr/sso@1.1.0","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-sUKrk8wsjprvsuNEKEh8WU4pAmGN+2b7tkbg5L5aXVum9yDutY5PzuiVB6OdpcByJfl2ISKu1+DSq44uDGrjXw==","shasum":"d82ab4ce8db051ac529eb74bcaeef48d8944aa31","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-1.1.0.tgz","fileCount":46,"unpackedSize":116869,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvAMBYWADa7Id/tMdk4ix8MaHmJpmE7ubAqXaZYzRw4QIgX8HvkVKGbyAWH4LCRsYeci2U5qBV33+5dHVd7iThNmc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTxjQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoYvg/+NVU8eFu9whudFAbcxyPtJnGCdlkEbZ0nMdC0kom4O8sRJVAr\r\nMS3/H7WHzqZC8mywQCOxKHDL8BKBXfB4hldqWCE3VBtEjh2DCpQPzznCmP/T\r\n+LxD7+0B/Vqa38t/4mu/hDjvioIGJ7RMeboZTGEN6OrDqFxk0S3rChdO/g0F\r\n1rCa2RqB+bnRoXDUYJoDwtcTLihUq8PpGn9s5yYZZa/L/T9rYjc+vqGqM0Ia\r\nEzuLVbktc3GKG8a8cEMQAYH+5gpgxl8w3DRMecfzcbhpSkWe31CX16cmj8T9\r\n+rO+4iMVB5wZuEg3n7zje/1/lCQuC6q/U8cXOug8ZaLfJSbSkAoL/5ex8JPZ\r\nswoXXiCnvO1YIUEZr5kcPzoAkCcbmW4UMFcCbn41jkJLhmGEMl7JEjIlcQ/e\r\nZ2yN2Fry1aOVdX4pBTFjrsjbBcpWHZOn9q+s/rII1ehgva69iqQcdyb1AU1q\r\nMNvID2Qxl6nwIhyzFnMfNuGR16wS8IQJovJTlIQsNxuShqUhnVoWSDa4DFwH\r\nF2qawXCjEFmoqOmM0aPjTYX0e/GizjqrDhr8Dfy4woTJutVykbDfuqKSKib9\r\njlNnQNQssBpcP0CCeJxEEYEsEd5X5v3NG7Z/Ogiqm5/wkp2Z/ZdR+OFdpNWV\r\nbH/HgiYwkgCwr61ooxpHpfY9C+9XSq9vLo4=\r\n=I81B\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},"directories":{},"maintainers":[{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"felipe.ferrarini@rockcontent.com"},{"name":"benitsrock","email":"matheus.benites@rockcontent.com"},{"name":"gabrielrockr","email":"gabriel.ferreira@rockcontent.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"},{"name":"lucasinoue","email":"lucas.inoue.lcs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_1.1.0_1649350864211_0.3652921787738488"},"_hasShrinkwrap":false},"2.0.0-alpha1":{"name":"@rockr/sso","version":"2.0.0-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"4413f2dc96f39a655c5da28ef28dea0d02b3d0b5","_id":"@rockr/sso@2.0.0-alpha1","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-uumefkVHMgRX/xErvJbNbcxY1nzX1gDDUIacdUyNVTB0Tv3PEJrlAGEFcYyLQIpJVZCCNI9PL9qPWQQUaVRfcQ==","shasum":"460939f1d6e27b0b55654deee867c6632fa70a89","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.0-alpha1.tgz","fileCount":46,"unpackedSize":125333,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5ifZb4SG/8VNeGVWiydNFRoyMv/GGkdwrttPbomoe4gIgIsPWzWSjcFb4mBSjniY5fRxynLnHB7IOmLXAAUzWCEo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPE7MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpQuQ//dxgiUzpxSjzDyB3O24x1DbtxqnfTdXh4GrX9oHDrtnc7qryg\r\nuQHHuj53X1b0cM21929Uttoxdm6Vgi4Nr2KpnVpuZ2cScG6Lsz9cFOFJKt7v\r\nYQVCZYkETOwKG42QjvYwbtZSsV/CtMefCN2ULyZ1ikNzNaaOFeaO5MS1A5eS\r\nSg8XkfYge1+6k+kZVT0FMKqu4WjKdupMFzgFFL+Vgs20AWPvL+llIXxYqSWO\r\nVebhV3NcDtrSG344bgwuRMeqgze+6Sk2jNDgUwT7YiVFRzKJAcxk6NgCFMNO\r\n4rsOtIkQHhyiXyo/jygxpANM4CVhAa3TwNv56g/TWdrLA/3ORTAJR+RXOAji\r\nh9TvZFxZ6edsvRxcgsCDHs5otsQuEAn05K6LJz7zlY4cygjqKYj2nZfe4A00\r\nOz2uqBZXkzG8W3Kc85vZoOh+QQO382dnnU78d+e0VYQjbjdkpwPLWqRRwaOj\r\n09mxkpbDBvQEqDlD+p2RapZ6woqqBedZBlM5RcbKYLtzvxPPZ3JlCeyikO4W\r\n79Gb95B9ED1ICJzfCujFMiqL38VyfDITmEOhpT6bbihl1fcDcRAnMBVcnnnv\r\n50wzDREbTiV679Odv6Qff4gS0JAxv4KQ+09RGPf4vxzhtqMuQxNUonwdFPyW\r\njL5MUIN8V4r/dj1o3uZNDYQM9lMngiS+aWU=\r\n=UcvV\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},"directories":{},"maintainers":[{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.0-alpha1_1664896715945_0.1127919095673735"},"_hasShrinkwrap":false},"2.0.1-alpha1":{"name":"@rockr/sso","version":"2.0.1-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"a48a24fa4f9fc9c8c9e652f6bad273bc0f522276","_id":"@rockr/sso@2.0.1-alpha1","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-MHuS9J04d/68yaN/jafOOZFnKHilK0B7CQX4btAx5ZUvDIVpPwQQd7D9y9vewLoJUVqci6i62SMYbS2g7SHDxg==","shasum":"b197fc691309aa8b29e525411bb205e314c52c8f","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.1-alpha1.tgz","fileCount":46,"unpackedSize":125330,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH2aKgMZqbXeuVbDb/mukp2cPbSRAVOdO1SeaTPmAz8UCIQDk3Uhhi+4gmob+EFQJ/8bysmDBEeIN4WKDK26QbVoRjA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPImBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmragw/+J57v28qemgfzoEpRtvOe8RuwFlFFepmvMPgBZoCZInx+cg2A\r\nVbfS8yXZoOtUPB2kwg3Wn+WLaP2iP3Im3+9zl7G6luGgaGSap3euWWYNqmfz\r\nil1GjU0xUs456ecsr1+koSTqck0Qo4v4bSLd/41pT8CqSv1aM4yqBOV95oB2\r\npOeiRY158aWUqfZZeLAc5SMkjnO1eZmV6EkX9mWDwLO+qoS2SKYzw8tlpNEV\r\neDMfkEoTGYwZXxtprm0NNhVQnDPt4ibO5MNrVFfm6kM8rr9lO6ThDwgMcXLD\r\nehIJxyHXrsJ4UajbsTN+NjaTGmC62CIG94z8yJEviC3SGnd2sY5TvVE+/OHq\r\nfM22ky8p8nIM/hULQ6fKQD83o1jgkrGnhl3YkTw6ulcxW1jg1vpn2aNYan43\r\nKrfxj/e8fyO58cDc+jdKs3svoAySWNDP8Og740gjgVNqLAxLZzNC1ZI8Z49t\r\noFPcjV/L34zCfYToiKlzPr0OFrKGAFm9SQmLe0POHFax16ABRzIxEQ08gRoT\r\nRfpNHuBkT5hKYwyPQrf+4/WxFtNU8popQ6dmBz4xb/1TLIQsRTJhmd+oFSiU\r\no+vaAxnh5nYASHAVskka/StPWJ6AvMt5YrjTuN7qRnjOoHXuzxm6OTcr7CqW\r\nKJkkj7YPcmit96+cUzrEcoKXY7KsxHsASSQ=\r\n=QB/s\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},"directories":{},"maintainers":[{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.1-alpha1_1664911745453_0.6103233592770332"},"_hasShrinkwrap":false},"2.0.2-alpha1":{"name":"@rockr/sso","version":"2.0.2-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"1daca88289f06cbd0146306171b510978d85bebc","_id":"@rockr/sso@2.0.2-alpha1","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-xUjWmvuZd4MJbVUOukQS9xWC5kuy4oRJyF7RDFnGvBlPp1F2K8LFHsqX+6gNaBOK2yTGIErlnITRxDunKf4hTw==","shasum":"bb4f300c7f884865af474fe388dc2c688fe29004","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.2-alpha1.tgz","fileCount":46,"unpackedSize":124899,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDu2oqTmrSdez4iYc9IKF3jptlrdhBlKEUe/z5QUQgp9wIgfzzw9c8N/8DVHfny6dGNpGzGupfuLVVDESvAGRVRzvw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPxSjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmreZA/7BaCqDhUGWG96neCqhbuCDoL6WoL2SrsB6MaTJRqmDRLa+7NP\r\nysCCkbHscjOswkskqPEN2C3J8U5yI5E4LXwhCb6lT0FgrRAyJkxBLAx63qR4\r\nZ7oaDYbIqbgDAHubd7PR4rW6Ey7HzlOIbKv+Jcq54J2xOdyWV4a3BFwS7bHm\r\n4MN1C66cE9gwt+7jKRwM4R6HjktkREbVgp5b+ekRlv2xtGhVSF1rProI15wA\r\nmKRg4O/zkZuqmE+qbDvk7aEgGmW6OtN4XjiOFJ3umwS2iEawHqJ37QAgSbVf\r\nxMFc4S/WtUAXTInDSHQ7Dc5hytX2AnGEsRSFgGHWYAEeGuEmZV362B2XC4WX\r\n2l6QN9xYwYQMNmPGp0/tLJlJfmC8oyab3GL86ZNsEeU63yfdzicFHtk9zq2k\r\nIvOnme3FAY7fFQinwBqGyChVemg6OmFhaxylBCvyZI3BI9ufHHDV3IEyj12o\r\nDeQa7En047589wTEfN4GtrdUinGQOtsnDxbeAXLkqWXbgOb4IMzfCQJAbUL8\r\nQlcBC652IiUch9KXwY3wYNpaUZi18D/Pm6OEoJG+zx0btcYxIb2ML6yjLyLv\r\n+vd3ee99NmDOAgwyGcbPV+VLQzegoysPdZkDFiOpvps1rV4wICcD/rojd0mE\r\n53LrBxybvWkcqX2s+LQkqy/zGYRjxOEQzD4=\r\n=HJ9y\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},"directories":{},"maintainers":[{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.2-alpha1_1665078434771_0.2759498999916412"},"_hasShrinkwrap":false},"2.0.3-alpha1":{"name":"@rockr/sso","version":"2.0.3-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"4009ffe1d02d631a707214bbdcf9e648490895c7","_id":"@rockr/sso@2.0.3-alpha1","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-6kARD5gInW+qAESpG1IGuNWGGqa9hVOnHdRwxUSbyNwjMQriBTUmNo9iN7cxYQ8G5tO5q6RlhRZwmyPb5B7N4Q==","shasum":"829cc4d76defef331e10cba90cc962d83778229b","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.3-alpha1.tgz","fileCount":46,"unpackedSize":125218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeLcE0uGOxcePGnBsaCkP1exDLhWoUNT53ko+FxnjdIwIgB4sdNhk8M7AUHPBEuc3Pwut31dJYlHi5DCP8yhbcYK8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQG7xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7ew/+MuFAXeDYFgF8yG7VdISQtf30JkZo3I7tDn34QqTuzssZu+1X\r\nqdau0M6E6hza+HsoFwteAzqxLPOavhITiH1Ht6ba6vpwamaVi4QHvnOQyGxB\r\nI4MObu03AqxsvPvW4tKbtJzSXsUU3b5FnM/g4+292tApUbvlCtCAhDryw34C\r\nJNBagZKTdXO5458DRAFxv4aoFe5e6S9noAw2jjboJvsjrwCq3bHclH56p1Et\r\ncN8J5vvczUyCSokk3Q4Zi9s5839jO4WDZ/PJ0EVTYP2gPIZDekNs5wM4iXBs\r\ncvQU8yqwggHZgh6CTkvfEcDWD+vaGv5Qtx69haX4GQPznHfsIic/P7ucBGNO\r\nvf/0+3XzUHNRlQM7BqlbESI9/sx12GLjIhIK1lA1BnAE2/hBeucmiTWimPne\r\n62r0DT/8x6H9kiHtucBqq7VDMJP30+Ga/mvJmiFJ64/PReE1TbCkdanoMNYc\r\nBK0SX2RNtgHrOBWz+th93CjGvpKd67efmrVXOeFT2VWzAr/ROXusjGS4g3mf\r\n80E8bMBBd67+J8NI8ub8GKOKwyo600F6x9eLMYiE+wPgOkjIrzRUpA0sShGY\r\nfJcvswBhofoFQVo7skv2jUWLgcBImdBhdS5kMkjhNJl9ajKOOpbSSIn7+jOB\r\neaIiBKo1gSXkrvJCjvIp7cd6Iaa3H4ChGC4=\r\n=4iTi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},"directories":{},"maintainers":[{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.3-alpha1_1665167089373_0.7674715237087861"},"_hasShrinkwrap":false},"2.0.4-alpha1":{"name":"@rockr/sso","version":"2.0.4-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"5c59930cabba5582d9159cd576d42b69474f48cb","_id":"@rockr/sso@2.0.4-alpha1","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-JFfPOQHQlwg80AvdU/cVlvQ8UkWXYqhFGq/fclOAgF39asGx3urtyXA1JUc9JFyA3NIdK7dpU14HFzpVR7gGmg==","shasum":"3998bd4b6bf1d8200bf2f21f9d2311e74fe67bb5","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.4-alpha1.tgz","fileCount":46,"unpackedSize":125244,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDwOLWuiR2NQ+zcLvloEFnY2U8fBXxFXP3pygIEoL6giAiAoSoeMXYTB+9D6/AAbYTVCqdCJaMAK/M9kCIJaTfp+DQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQIDNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqfCQ/+I6nc21my2A4+OfIhJ4pIZZ8r2fw+cRsFZcskRLIBgKiDhIzd\r\nshyGa9QPcrK4ueTpfIjEhFiZGAWXvcS5Fj9PtXbUkPh9I4LaSUYxtAUU/Lva\r\nL6jZEkWXWXZ5AQA+LceF6jedIsKxzmVNXpoHzFxis/bJ7Tmq9TezO+CEi1Ow\r\n8s8jFR9VgxYpildjnpcxA1kTOjxXEn+H695dxcaOu5WsNPiWTw8Pfke/sSNu\r\nJUf2GzmR729dPH9aUsg8D/6i7nEZMaYLUmyoMdw41AmKNP4MeJvbcIOOXNaZ\r\n2nC0/Z6PvJXUjMRQ1KMG2d/Ed90TVvyKhglPvCVQzureyeHXShP9H2wjVKUK\r\n9a0b+NPGrXKfrVqJ18W3zzuZbeehjRV8lORe5YMieD1YXSp/6mLV4MGHwFLm\r\nvUUoQfBqJutmyxbMJG80w5f+c3bQ0PnAHgF4T/1mmKLGctyP29Gy8qVEfclT\r\nRyu6KctrHnE5wZPLBkkXYeLnoitD/DmVp4ZPrpar+EGaJ1Bw3Q53QATGOLGB\r\nk35ojoC25EXqQy2Qrh7YxpBmqSPzKs8GGNkEowvT8yOZJ+Ldl05zpVrpUY4g\r\nHQMQfdzwLUGhGH3N1gIMzYoUuP1Pg9H7hhR540U2CtZ3oFHNfrYSrzdFxsH1\r\nUGIE+HYAxa1dM/bdAqEtLk1y70rC8f6MGZ8=\r\n=QqYO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},"directories":{},"maintainers":[{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.4-alpha1_1665171661735_0.697343491614292"},"_hasShrinkwrap":false},"2.0.5-alpha1":{"name":"@rockr/sso","version":"2.0.5-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"ef4ebd26e12cd26651c3498ce46da3dc316a2c5a","_id":"@rockr/sso@2.0.5-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-6Pa7SIFIsnrn0HJMwBuc8anYDMqhhj1SvS+pkC+zJO5j/HIxv7A2pQp5w0i2DBTYprK8hC22VWvMy70OxuGreQ==","shasum":"61ddc5fb49803be1d798fd18b83e621cce56b684","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.5-alpha1.tgz","fileCount":46,"unpackedSize":128756,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGC2Ax9ZnbEugBuHfTKl1cVSfhp4ABMlDrFptoY54sNxAiEAiKN4p1yO0dWKOSQ7GrTv5uYhzDAeduzzl7HhJ4uAfJo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSFb+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpl4BAAjkWn9XN/LDbyNkmR0Q0b8S1FGwwI3TxDtq9YxDnN9wOQMefj\r\nuJIz1c/GY7AjT67Rp7LrkQo/FtNQQbHVcnL6mwj4gs8iOpJHWDvGNUU7gMV9\r\nV1ONAwBB4LTLsf67qy0kTiigoO+J8Ot/uYqi03P/t+ylExFaqWOoumLfkBt8\r\nxE85VYQv1dwGg98Fp+UdrR8T//mX7Pt5nFwy82TgiH36vI98l7s+V6ixHCv3\r\nNi75VMnYdRpjFIjVj5ko2caofI/FDdGVxup8EWDRdi17D/8r9AWBQKXQ25Bt\r\nzVyBfDWTlCi91yBOI8GfN7OLxUjaIi4JGiNYaJHJ3pg+vX1veKH4GtbGcS2q\r\nX/O8k5NYsmhSDEB7qe0ilRhVHwUQsIbkpTkc+oK3MU3GpapSy2SsT+xyKYhk\r\noM1s21x85eRWaL4xlI2v46VWRz1QNPqOZCRm436hJoVBCFGvxdfPGSKvOne0\r\nqRauIOfa84/scQd7N2XrQ5ojZVDV3QfJDS/AlE0NhlpA6BYQZoUU8yTuuq+H\r\nCN9jX7p28rVvXZvgc4T+0H9aLrJb3iYIBVWQmbipDlaj/6j+KZ/saYXUTvRK\r\noZsftnHO5s7RJo3AiQzgigCmaPXvGHYdqlNWrssInqP4OdAZVYRXbvvpFoLb\r\njWDjta9OmYt/1cEdUZGIGELIk01SFC1weag=\r\n=S2f4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.5-alpha1_1665685246231_0.9507919972268413"},"_hasShrinkwrap":false},"2.0.6-alpha1":{"name":"@rockr/sso","version":"2.0.6-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"d7e9d1b7365ee3f6e5481477298ca06286443c95","_id":"@rockr/sso@2.0.6-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-iSbz2lSt83DW5a9I8nRcu9hnA0sOX2B4ruPN+aT2nNygof25IJ9COiBGC1fO2CJa2nZ9b/SDE1L5IZNxP2z5IA==","shasum":"79a1b34239e301afb3f7cfaa938007dcffc0e7cc","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.6-alpha1.tgz","fileCount":46,"unpackedSize":129179,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3yQpEseFyED8K3hfoaFiMPzUePF/vz11+//zpVUxMTQIgfvEmzJsbx/JDiey0EVcBxLi3cwBrVySIvJv1L2ksdcc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSWXFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQ4w/+M+sfxnVRU063hPjDHgikibO3KFQPAF1s9xFkZ49Pjc0DvtdH\r\n66BW12PgcRfnCEexDkHmtfWshGpcoeBXWxa7cPxyvo9aKETBoeLTuXJ67MMB\r\nN0YFKFsBheg6bmMu2e6YScKUbK6eC86FzGqeZCUQGMrTkgFAe4/orMNgeq/U\r\nvsztdTAVEhFwSdQfW5sQNYJsiCafTFPqff+WeTAFHg2L/9XOSaPWC+lAML68\r\nzzEFKJVhysFjC33t5u1y8v7pl4ykqvgwkf4osp3h6L8w2x/ItCZsIfFBfaWe\r\nkUkYjUPEvpJNJkLkNA02kHi9pmRIdefIrzGib6HQb2F1lvXCaoiw2t+RORdo\r\n3nIl4QZ7KvgAUiWMMuSo6nVh4uNP3kInG79CgRVjq5wcaP0HjLa3RjZ0xG0r\r\noEyo9fXvDv5V5roWMNNEsS0hjV6iOimkeDHy6lYjSQYIj22yyLeuPsioq6Hz\r\nDIv1Qh9od6VVOmZrfVph+W1nyoWGR8nkRcAjHb1lgX3JYqT1rMfF9UsKIbAC\r\nRs5hsZu/qSAtgXUiJlhxAUleTg7WmEFaou3iIWkYj56hwxV7hvitgfOK4iY0\r\nNIzcqA46KSEYdd/MiRj7mwEWpUUWVRuzUu83wehrU4XWiTMCEMalq2dfvR32\r\ntIfZp9/WAfVFs0MFiOc47xwkcXKh5WGZwkw=\r\n=02r/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.6-alpha1_1665754565676_0.8272322881601331"},"_hasShrinkwrap":false},"2.0.7-alpha1":{"name":"@rockr/sso","version":"2.0.7-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"2182ef6e62b0d20ba86cb5509e4006f7fac4c699","_id":"@rockr/sso@2.0.7-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-9qu4PI9hc2Vbp058/5TvrAirrpdIyu1Rkl48/SqlLmJKf2WdW9s+MZeWJ+sYvC05eQEijRisLyQdD3wYVJWhiQ==","shasum":"9dc4646c94f041e68cf681eb58fc866f5ab02e63","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.7-alpha1.tgz","fileCount":46,"unpackedSize":129259,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB9yyOx0y3NJdkHHG9H7ntuHrsYF4HVwcLM6/B25adXKAiEAs4EOsUSA9o2rYPTTpAygzgVbURpI4zkEBfW2/wT4nes="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSYpGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrd2Q//WDH3b6h/6/ou4uJ0SLLl2ldfnWN479pacppnvfgYXOo8/HzC\r\nCMib4SXzV7p1Oo/lX3gZAqhFbuZx55gDEYPkJqFtxh15f149jcYct3Wdt7jn\r\nmKAEjD/f/1NSwaLlWhh1YPwIDJiiRtnegUvVL89enhk1RsmbW2jdI0ykMcsm\r\nSrKfH6JJEMYLVjKTv3DaOX0k4sAcff371T//oOp2n3eNKpHvUFNz7JXz2zLt\r\nIe1M8eQWCtOgTJPX15iJdOdwmFDQ3ZME2DOah/roTuNqBZqS51BjPrsvJH7x\r\nV4IN4ID5hAPtSevAxheKNz2bTIbAvi9bzvQ/G5/tLjfFxctodsY80gOoNkwB\r\nsZdWQnJ5J74kpba5KjaNjty2jpUYiZAVv6qR/ebdtoNXweChUrbpS6PssS8Z\r\nD2ZB+eW7vQ+zUjen5n6IpZdJadz7t1S65apLPMcp1Cb0YCfaF5BCbcLHnTJ+\r\nh0L3DQxZVHd32zPAvt65OzISmqa0eJLLDOnNxz5ZBZF/+2e+4/r/8yD9Omt8\r\naZDqV2kuptfGDz5JoRfvmTcBdd5MYkE1+afN9/C69XLI6fYTFB/JjBsM0bYo\r\nB5prVhb4VaZxSh/1fR+2pdvVU0TiMuHfSNnMtwrWUuwFtDGhFoeJKZ1XXEK9\r\nF6S0k0XYP3s/lGRyzQFOXnP8vhau7OWQb4o=\r\n=mk5x\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.7-alpha1_1665763910431_0.34824706071574574"},"_hasShrinkwrap":false},"2.0.8-alpha1":{"name":"@rockr/sso","version":"2.0.8-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"e8d393b982955aa19b040165b8239d36333d0d25","_id":"@rockr/sso@2.0.8-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-9kVotwKmvcQyzYnLXL9JcgRi/i+4tK9IDZ4nn1BgpQCjqNb7/RZQd+JGSI6ExwOM20g2KgL9wl0MTUfJb/SI/g==","shasum":"c612c4be0d50032825167315624a927400807da4","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.8-alpha1.tgz","fileCount":46,"unpackedSize":129259,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBzXiTGHZ8anN2Q23BrJn+9/M2VZsNTkpdlvpcJmrQzpAiBZDKXV661rK0pW8wLzpkBLMqX8bvitxsuY3amt5Jk2Wg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjScfTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7dA/+NQjikLGoHsYeleN+pA+Zq2qjCvP55xEPEeJos1Wg/LWjOuOk\r\nzHLOQe8YsOjGVdqfC9EC1xhIWaJIwWcLgPO9uUGvj9sQynQG//QJfwoefa5h\r\n1BN0FIovutNTwm1RDW+5v0X+ZvmMSKliMdML5/lu+Au4vubWVvDq5LVqv/5i\r\nJVcuJRAXi3WmA/xEArtQl0zTjIXYF7ijCVdEHcf7VL968E3Cz1YeYfy0rFro\r\nrAkQVP0qMjWaZWBJrhsATDsygS80NU3so74d9eefiMGB1I8WO8N8E088x1/0\r\n0sToTZiOoYLIfgECpk8I1OpK0k682cRvbrIuKeNtgry3B4iNl3pBerWQYEdN\r\neZXV0XDr+wJYNA7aZJ6NlkW5GuaARSRAqBYgHMdkioYoE+99CiQuipCpRJBP\r\n6vgrkIQx8xdrvE/g5HuMYuq2q4DZw83+QMFcq0Md3iruQMGDUlHl5IYXVcSL\r\nfFefa4GEHZN2LQ08JS5WZ2vQoQigNaNJcGApa8j2CWGqXjjWOAs32uhYlNHr\r\n/I0U2o8yn0UD9tmXhAovRwSpZA9GDtU9BVqyndAihq3tYVRTz/E1Wlu1Fphb\r\neKTsF40GWm1fPSob3YHSu0v9odTrAA7rw2qy+tEFKNxSqfWFSOU+K7v68FjN\r\niTAyoZHVH+difP5BDEjCUxg6FzCASlJ8+yA=\r\n=Mvvg\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.8-alpha1_1665779667317_0.0877773552665233"},"_hasShrinkwrap":false},"2.0.9-alpha1":{"name":"@rockr/sso","version":"2.0.9-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"ed51394e3aa0ea3e3c28725c6c7a662f79c8d093","_id":"@rockr/sso@2.0.9-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-vCfn/KSdKfpe9L7THPVea91ZjYSYPesZinr8sS9g8ef09pdAuHX4IDkNIK/CSsVXLubV8IhooDDy+86UXwItGA==","shasum":"c496caa38559a043baa65968b25ee20ad60c45e1","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.9-alpha1.tgz","fileCount":46,"unpackedSize":129456,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEgT4QMU1HjVjxM8RLv3PSXpJ9wYVnf3vZcsqetiu6oWAiEAt3aK1C85CIktlAJMF5omI6SZd6+H8sjT8ooitZ+Nmlk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSdkMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrxVA/7BmQg3c/DbNDQfg50hvim/g1uFPM97ytvRCv2aL3F5/pMCRtW\r\ndByvD2vjwNy/27Pb7mzlax8QCIf4oXUiRAOgYBxaFNF6dSEoB9/BVGcEXkLt\r\nT2UsKMyzTtcPVrps6RjNUh5nRVB9s0Bf5vrd7nztgyWWf+aXfGlnCUw2KWKG\r\n/lVO2f0mCYwN2HLtoDhxvMBkXnnwcegxQ/zBFIku4YrrleIAjKHjL+TaJ3Uf\r\n1xmDxYJLx2sJGLahoTwRGR20o1B3cHtJrcJtlrwRJ3TrWNvTDpVrBHHXv7+x\r\nqXkN0sK7pB1+ncXWv0vB9lbmR3L9RiU3zQf3DuX2ETmWSzMfCqYyRgLhVxiy\r\n08YqFEmpUyPa+QTIleVyTivRVPshfuaZxrjlmwpV+HnpKo0RvEIVKHg54EWk\r\nOmZOBT2+lN6HQeyOpjjJXj3ZiTGlp3++elMye72Xk7l8yxzC6yg/TokJ6VwE\r\no4S9mvLzh8KoCfk7GkEzl4gR6TLIamC8H01nBkf2yU60scwn0jGTYcnT1L5K\r\n/v4GQOTf4mZwuGAbqnjuYUlml6DKvnRHPqV8JNqdUk2v/uFU9J+AVqlYVF06\r\nOp9/ZSh5BzsXSK+OrGIaWDJ2EKxa3dpAOX0rquZfhhrxKvFOxWSIohI1E/lu\r\nUwr1YLJciJ4ATmS/NbWhJeuWADBVZY+Zv0w=\r\n=7bHP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.9-alpha1_1665784076359_0.8882165016774517"},"_hasShrinkwrap":false},"2.0.10-alpha1":{"name":"@rockr/sso","version":"2.0.10-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"4d3e13b5aae17acf9fb1d668b7b87e45b1e6d007","_id":"@rockr/sso@2.0.10-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-lahm/dhtxHfjCH+QUZoEAg9EbmsYPF02hyk9DnoTzdF0deGi0PMAqBfvtQNB5RuL9PvJAymdkG1/b0SdpIYdIA==","shasum":"42284a21bdf426e3b017a81379ad0096f43aae12","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.10-alpha1.tgz","fileCount":46,"unpackedSize":129527,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB0LuaU1pHSJAW4C1XS82L3dyccPVuESxP7WTEPHfQrGAiEAh/eu33ilUl4OYHWJIB0TzHPbT44DaY7zEE1fupDNawU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSeKBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPiw/8CSF1XS5Y9wdo5W39NFd+SN/24iFRB2Ar2l6Hfc6/mVSZycHe\r\n7UwMlYJl6eEYOJn5FupUkP86Swo88sq4/a7x39dUIJfF8LPkEpNA8GCDSYDO\r\numZeow4R7gC0Rq6PIEIuWTtn6qztL9n1j/dtnF3RyG69QZuRxvSJpbALSRJT\r\n/mJcLkNbf7EfksDdw65SK19cxtTYKHxbNtsRsvH+Pm8GGjMpPKdDeW84xL1F\r\n2E0BBP2jDMncfJQTXQBlznHODZkaHnoKVBxMtvt/HRz0aU6vmj9Z9fMuFHUo\r\nN/AhcKN2vfX30RXX4nDwyhlevajlwLbW3tE8QFRvWfTof1rMMDQXvCc+7ENy\r\nkVQfyik3iTF+qTdFk+3DEe7W/hzoop7RubD0Jwause2zui6/rkOeXpH5RYQ2\r\n6RZgmA8H0cQ9cCNMu0/N2BUXJ0ry6reF/TuDeaf9qBnkBzYD6oLVJRuh6+/r\r\nMtPcR/xsyeRuANZn3inuSaAdnE4tEp1IyU4qUGVmfe5WB9QfDdL9LLiHK58s\r\nH33uV4OQ7zu3xuU9ISflb0mPhwTACrVaXwr2YUsficWnz9JzhjOZy14Cef/c\r\nPPLnfx1Y04vbnQ3NWU4Ywdzy4Sr1OjbMtrNusweVAKyuvn4mUr5ucCrAarl2\r\n7Gx2RFtjuxWfkd7Ly8JPt5JsCMgd0MGyvt0=\r\n=Ltgh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.10-alpha1_1665786497035_0.22874135017652342"},"_hasShrinkwrap":false},"2.0.11-alpha1":{"name":"@rockr/sso","version":"2.0.11-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"1c2173af46fa7d4659784fe7e9a387d5091f4c8e","_id":"@rockr/sso@2.0.11-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-+mCxO+Z8hCAJ0+x9H9+qKeQbXpbt7pzFbbu6SjAue2mkBbt4gkP6M7O8ISjdIb/rzGJSA5g1NlFT+FErV6AsqQ==","shasum":"9424dac628cc18be65050a43322bdfc6999134bc","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.11-alpha1.tgz","fileCount":46,"unpackedSize":129216,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjZ+VpBsTLUwjws3pxqlRJvlmz9jPD7GsffbyrC9PvgwIhAPDaScsa68FfXxj2JqVA3l8gTOOtiTrcsZPLq7+o5G4v"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSex4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiFQ//WHtZT0Mu9+ihiwgvfwTomjqO2wsdPJD7+gc1tPZPQ4MKSLWp\r\nHedcOFeAyx/cRam7NIAvacoaGkSYCZ9uV6N4BYx9Puq3bhkz+dh1J+MCU6Ye\r\n0m4BeFiEfPardN4npRRSRk2BQPDP7TkBDr0K0UBl89Nn4tJOptupVwXUrgJ6\r\nZMBpe8bHkyfqZVpvX967SfEHbcIPPcMzLzDIm52WDgAVsz0Pj/M7bzcqsPkZ\r\nai4Q2JybP8gNz+iHA1ibJXL4JHNYTCSZYk/UsNHpwyCcJwnEL/6t6J4+6iPR\r\nfITkDg1zjfYseX2mmMp2umna+PGMnMCicomioZy/5Mq7GCYtOUPcbaITYwtw\r\ntWs5J9Th+KxljCWKJuzeSMfbAq62f8//7Va1Vczv7eLFWZGNjpyA5CBfeS8t\r\na+qMEPuP5rnkK+f7wjWe6bO0gSEJXxIk0mNPrnH0KqPtOpGkbEZNRzmTcE+h\r\nBBedc9as8vHuG3N0DG9lvAt50q2KGCRXAO+DJdECUPCmXjMlxoEIaUfBJ4Pk\r\nI49iYufxsqLMZhdIqkxTWisbFaeVYbHqiU24opwlyofD7siji5HbqxGQkwOH\r\n5aw2Hy0s4/db3ScZYjAKMjb4DEs9WlJ08xFKjOddq8TsVCVVgFbSJhZgoj7s\r\n/JAgupCeXZ70qiMr5NbaPsss8xeX+YH9Ews=\r\n=RtAy\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.11-alpha1_1665789048019_0.7989836289169174"},"_hasShrinkwrap":false},"2.0.12-alpha1":{"name":"@rockr/sso","version":"2.0.12-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"eb67d8cf8383799caf1f7bf2f720f2f40a2eb2c8","_id":"@rockr/sso@2.0.12-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-XQCMkhWJ0sUFpjIH+ofS0x73iIXet4CngUu2JMA1i3y4UrBtxfIAroKFQ7jxVeX3GN+CuANrnEkmn2Me+V2taw==","shasum":"218847bcf6f362db239aa843f3d48c4a2a3c24de","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.12-alpha1.tgz","fileCount":46,"unpackedSize":130676,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHuT+KFUJ+DyTsSOhqd5NxAAfnzC6uSs2+b430syXGg+AiEA7TsEv67Rit+auL/5u7cuJ3rknNRoJvBZZLUJy0fWf1c="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSfSxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqg0A//aYvuQkswlslpjD/1GriKf4Ln6fqnPHnz8BDbfkA7hHeKMROd\r\n6uE6QyxvGF7Q5ywWTZGIcRnTqGQybR2FHXZCBG+YQFEQiENAhieX5bAs11I5\r\n5IT8rqcpv1yrJf8myY2ntaaEbKVVHLE7xNoiMUSjHpGjbALzRURjgxUHh9ec\r\nCbla2gvc9oWwWyBY6GQn6extb5yI9F59Y7xDKysurpKnRN9n1DOrHYyn415Y\r\nv5Q7v5m+nu9Tbc0TdQGfX+Xe7N3ohhOdIXWkeivKGsyWXjBEO929bDm0mD6P\r\nYDEBhOO/2e9vDLewGl+U0b0KxkfjX4su4do5J88JV7u1lN9d8a2uqtZrUKue\r\nN+sQptNTRByOASKRLN4WEszTW1nOhI2ca+xOQHnozj/4Thl3NHwKheU2JMa2\r\nZhu1F6zdfyiO3ehclFR0xsX2nrJ3HIpQOPXS647EQtcuLH1LTJKgRDTrUIVo\r\nXKoPN7mqQGKhmNMl+6a8vonk2dgfh7rHH87kJDnRLoKSuwexXfxafIgxZYOv\r\n8YtKu85vwoQaVz91pWwU6ZKhocoyprHKdkbo5GzYM8mAkUfoOWS8UXrV4jF6\r\nVvt15V2M4DKto7N87AaDX3c8zS+a7RFVDwwYMzPerggBZ4qp7nA6GHB9bL78\r\nRbofEBkvno1KzFNnU1AhaLCD3pZaTjKcpYw=\r\n=lLaq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.12-alpha1_1665791153381_0.6801146793976849"},"_hasShrinkwrap":false},"2.0.13-alpha1":{"name":"@rockr/sso","version":"2.0.13-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"a57602dda89f1a8056879e7cb8a3f7735ae2a113","_id":"@rockr/sso@2.0.13-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-nnzMU6w75/TDgTpeDZkHDv1QcEFlnxLj7BSHU2wGZxnLh5h+cT5qKjr+QZ115b0yAbwTOHWfKelRsqBjiV4uvg==","shasum":"acffd058f2d8557549ee8d5f5371b8c945a7c7ef","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.13-alpha1.tgz","fileCount":46,"unpackedSize":130591,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG4LJo0v7vM2NuCo/QLmnIzrQw+20jKPStkqw0eZNcFcAiB1lSfXSGd839hQMnVJglccPwhFJxBwim3es1XBRLLr+Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTa/IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIhRAAnRriCQcbzPcA/dQCu0FsUpU1xg49Cbfc0lZcfIOhOq6aINH0\r\n/uicvjpLAT1YYQ1xjXs8tMIHbzUN8h/4FaE/C6radX8Y/u0QRSTd6ePWAs+r\r\na+4xxLkvj+U9zEaHHNzD8sl9OJpNuRxC8vlVUon1W6OzhCuvs1ZcUrxj6OCU\r\nS2sAoof5EGeAOyqzEjiflzksyAEj/VS6HSDGNWzBNykvnuMWoSq90OmexgoH\r\n3MIlx65jwx4lATWwaWmaSibBOWQ/kCjA4m+D8L/nknnqsFYAkI3zSU5E5qhc\r\nyRKx5YZozEyB7tcZPYLLBt+x1rQQ/goDAJCxhKhLmy0NaGIvyr875F3vqRr6\r\nfNX8DvVAraXU/a1rwMTu41YD9CW7SWG5A6Z8IKx0eZdzDpcEOvJBXPn67T3H\r\nndFxdIOeFsj2IHjSMCziy9ykZtu4s2iLn7of0R/qIXCj3dVfQtQlJhegmCET\r\naFOKdPo8Qha6gSxgZyUwehMpHxviD4XNIn1GeAsMFoaPpNnz/viWh37nsy/l\r\n/jd1Z1216qBu2HZHTuT696JFHtHuEDb7X7VjVs9UhHcJNWDQEzkCaLQEECYI\r\nkxuPWt2IAu/kpHWIhY4zVtGnQJuSwwssqxKc1/zZln6/sM4Qsx46dkM/DhfO\r\n21lqcC1fTMiqc3uioQd2Heh5eaWGzl9phCc=\r\n=2A/i\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.13-alpha1_1666035656043_0.42627783622549154"},"_hasShrinkwrap":false},"2.0.14-alpha1":{"name":"@rockr/sso","version":"2.0.14-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"d3c811cc808ea0d00923396e21318b2c055ab579","_id":"@rockr/sso@2.0.14-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-kH7LhIVsC55E5DNOsBbtdHymqjhh7glwrt2vVC/QkCnkKLc6nNpL8jP9BJcEQkUbntmBJNznXOuW947GsTMFtQ==","shasum":"590a9015192a8abba4f071539806c034eb519fbe","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.14-alpha1.tgz","fileCount":46,"unpackedSize":131148,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaa/1DVDFYSmzyMd9M/r361YHkS/+1JCm123g3eRF+hgIhAKIqJNODjGazvLGFR/NumyFbL5ns9DGtZ3IgyflPVMfH"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTbt9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMFA//bGJMgk9/mKficqnSrpjfyXPfzf5eqCczt7WrnOv6M5xTdnVC\r\nYYPMOBZr0Qa4ZEs1RjTUff5r8wXc0Zxf3PGrf0FIL/x4Li6KhT5wwhHMq4do\r\nZnXUUltqJhNi34/iWxrsC62/U57t8/3GmgsqyEFIwO+EVScOOY0jcogxPDA7\r\nH/8log0Pc4/FmPUSpBukHwAdMXGyby72+HcHAsrq8+HeG1Cr4+Dsc+QOnMwq\r\nilNE1NPEiWfVOgV/X3F9b7hXYaR77ohxy+oK7XD3BMuav1smStzvubgkOwhc\r\nraUFyPs8q96vsydvWKJEzFX2cAj/xtrbNTPYZlN3Av8saYBbw7Adod5z8xjn\r\nvX9NHRk3EjPSP8NkATX57j69O2pm5W8/2KmGjQu6eAj5M4DqZtyvIK/wzPzO\r\nmW3i6bmvtZJW7/CBSOH6kgSpmvipaocgvR47Lv4hUYQWwuyM98Gp/LjzpvT0\r\nhV9/cucmw40QSN2Uj+5naaCoVHOPA31iI/0H8aJ/THlGo9UKVUHxBNXkAxsL\r\nggyn9txEIqDYWsQOTUmrM2E6Npy8HiGPBkSRz4QaOOi3yJAjgBhxR7Mmfit+\r\nwHcYk5k6rLWcyKUi9yuWTlQtys8W7gDvETELurtB7jcsfElucWmykgyKcWWZ\r\n3N6rB8+IW2mhRIdES+Li2pKfKg0TOHv/IuY=\r\n=5qFh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.14-alpha1_1666038653419_0.651556371093883"},"_hasShrinkwrap":false},"2.0.15-alpha1":{"name":"@rockr/sso","version":"2.0.15-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"f4a370a05661fc0d73d5387945301e78b06075cc","_id":"@rockr/sso@2.0.15-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-wYKU8LUEj2rB9zdjG8ZvgY9qRGuW6YpkDk1fDfE4oEsTfGW2qhTrJbPU3hFCpdMMr+hgC5GMxGiAOlg+aKibVQ==","shasum":"e4ab6708b95ca84e4a5347b7d18a8afcc35cc7c5","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.15-alpha1.tgz","fileCount":46,"unpackedSize":130726,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBUzr++MnC9T/5NuvF4JVFln3aowBYgxga+Njx2jOPn1AiA3hyZcCASy6jOL0Re3MsAf/2gc6AI2/FzniLz16IwxsA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTcbQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonAQ/+JeGxGDYax9sqqUcYaKNweHlKY+Ah5DpxFPn3guREKQ6sAzwq\r\nIhT9SQAYPCYYt1H4GuoKQUl2JcosRp67UUcNJljTdm3yGARMcWzXK0TbJbjd\r\nHFKvvUWVUckOp/Go7DTPYdjcAXQ72Sr86I8lwjjJj9W5M7TB2lOgZ5QVWAyX\r\nBpMqIyQYiwzwgIclFLmeWvN32qIVfQ0gogE9NEMo+hCehtBcnPy2HN1tviNR\r\nkfCpig1TiFlFfJbuBoQPKw6PzGXXmBWOrLGBQ5nDdGZox9PJVVnGuF5Pbf4w\r\nrR4KtFjEWY8ZNnmdMXtOEX3CNRcBWT6tYHYCEnhFoJeJYf/x2SRtYC9DeblA\r\nA1IgCOhctL29jgrJ0uxSk1ogjM1j2B8lgyyrbcKNLwHGCy83mckpjIrCrp4m\r\nRE1Lg+9LAw+P9xDKtLCbsaCkLa4gTt1caCG2bU1uk4Xp0QovzTJYVTdzm4kj\r\nqEHwt4zfpkE90ip5/pQO2kbmfT4BD9XfJmFJSX30G1HdsXSUJ1GX0+IaiQdX\r\nvtU1xtbs4pFiyID5NYZHNlElubQ/rASPBB+M7k7Z4XisM2U6lp0OkQpq/e9X\r\nMDs+dZ7eDlHw4rTFpxtuNOWTbs99E23G/qE7Wr2VrR6kQmosuwUHXja4d48X\r\nraUIoZt1YNVRqiBMqKajvEyTnk7eBFen/mY=\r\n=7Vxk\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.15-alpha1_1666041552302_0.48807636268417176"},"_hasShrinkwrap":false},"2.0.16-alpha1":{"name":"@rockr/sso","version":"2.0.16-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"3bd90bb9ba0b6362e49917c80005b557804fe3c0","_id":"@rockr/sso@2.0.16-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-iGXfzrsSDeNVQUy4TIpKJyEif1eda15kL3eTUeSojrLWjWgLcU6TuARmJOvD7wP4ZBRRSwFN1X3dtHTWj94VoQ==","shasum":"03a2c230082b6c92fc165a3a6571bef6cb8978a1","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.16-alpha1.tgz","fileCount":46,"unpackedSize":134925,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFa3JyIjb4dFdw63GFsUNPe/1kRsr4rBRydW1L8Vu8l/AiEAhjxFvPVdz2i/ypwsTmB8wCZWobvj3JpvZb3U16PNyvk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUWPEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSmQ/+Mmk3CZmt1jS4tLALwP2cFxCcRpZgt7hDfC33l53QCBJqJZ0w\r\nk3+jri6jk2+CaW4mSEtqfETLLZrVT8y2QJfliKrxp6vdb4gVAH57Lvci81Rn\r\nKQjAjbQhEih2vhQxlCsfeAfibZYfteVfrQfLl9U1vmAPXpeETv3N9V0KvXKG\r\nJOhyIylYzBRqkG1GcyN/kGEdw5IBz+CUVc0J+XsD6H4a1f0U4aJ9vSC+1ge9\r\nVK0fwIc7zEWdwLHRQ+DZfkBN5Uqu2stkEPuq5lZHpWRtkC1rIS/1yxim45q+\r\neHOJJaoomqKLsR1t6pjW+TYS4y1u5Ba5yiMdl0FvMagcWkgVQCC5UZBuOAt+\r\nd/F6iB4fSqutN5umGwlKjNhwUub32AIBvEOeB1wxdwFrc2+flRq4NsVoYpEj\r\nI06Hor+CqMrlQ+lnVwELyxbc06Dd4lwMQVR0u/12rcikIWbthazPgRC8su10\r\nSD58HzVEYS57I9vpueGEZG0R8BRg9RPfDmsv9N7Rs/+QmMG9iaq0ZSC2HnST\r\ncaS+i3jlKGSxWeEKjLtfyrfFBMTUU4QoUoVA/HWXmheoIPuJARPfLOLvOmKp\r\nQh6uk/DuiinaRoSriJ6kpBrCj8VCScdCGNCEuhVZW5brjFBL9mW8zYlrq59V\r\nJY+WU8uWo8b+pDWgjdegSN9yEDUTsTYbwvg=\r\n=95nh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.16-alpha1_1666278340071_0.013122759830944464"},"_hasShrinkwrap":false},"2.0.17-alpha1":{"name":"@rockr/sso","version":"2.0.17-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"400f0eaaf056c1ed60bfdc36b8691bf3779b8ac8","_id":"@rockr/sso@2.0.17-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-kksblCuMhmiY2JYq3yXEU3rbUkhsDBI+vEPozYN0XHEL49do9KH06Fx0GtemXmDP8/zQet+0oWwqSCGt9wU1rw==","shasum":"96898f9a4345298f29b5f6cff628b25000082891","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.17-alpha1.tgz","fileCount":46,"unpackedSize":136938,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEkFDd2gmwC0pIVoQ6sjq5jH7i/8Qxvya2TrnDWLdNAwAiBNe5HvOzAGqNWWEFQ70Z/hVEOJzCG5ydxHzmNKyxOyww=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUqqeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmof1g/7BsigR3TA8sLnmd9Ncxc1pJHQMPdervgx/Mr8oMyEZguOLnIE\r\nrfbLixhM/tXHr5uJuFV+F0woAfnXlq6iMJoM8qh5O8Qr/pONCGWqGDbAj91A\r\nhZ/IRWe33tDX6Wn8+rx9P30VlRFFizwfBnl+k7I+jsA7RsRz3o6fMB31Rx1q\r\nNNhFzaVzhLWaac3n5TF8qNEq1O9/DHSJYFhr2aMardVz+/rijQf1SItOtQhE\r\npnAgaIMY8ucWI87QxDEX4Ag85D6nGxN1EB8JjNNX/utSaQjoCPIB7pKUSM7P\r\nMq7JGF7CXhepqKS0OiFlJOsLFnehmy4s7cR3lYCZ5gBcIURaZsGnsrI4o3KA\r\ngDH7JDzkeRpm9Flkfwa1pqbluQok+BTFSnpbd+CEI0jCJfz0kPlbhC+u5CZt\r\n65uTjue/HrhXXmfDrLa72rf72zZvZl7jNjIyxZ6fA6I1QDm4XY44HK4CF9JT\r\nMqK34oRvBt0VOIcH2Peb0NSpF9SdTDSoR+LzeidJNT5m86qBOqEamVdc1bsk\r\nAG38Ev0ZoXGONn4EUPsQc2yHPrSCWH+vtynfijrYDDeyfKLe1wom3v+oAFGg\r\nLBNtw2Tt8HTr3YXP23vFtfWBiLl+upf2mq6ky2VNjs6dietR7XC0aKzcoP5I\r\nCQ2e0v2x/EUeVvK0AvzCU/JB1D1iywR90Gk=\r\n=BMHh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.17-alpha1_1666362013795_0.891163585349692"},"_hasShrinkwrap":false},"2.0.18-alpha1":{"name":"@rockr/sso","version":"2.0.18-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"553ea25704a48688f173f964da20a3577c6d9340","_id":"@rockr/sso@2.0.18-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-0ibuMdUt+VXFh4HroBx8wxywkn0ejHgCX77C/UP3e8tmSEoxdxY7hnJXCsiaEPbQOlgKSW3rOLSIV9lc0Miwpw==","shasum":"8b4502e2d953cf25de0a638eee7fdd2360aa7213","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.18-alpha1.tgz","fileCount":46,"unpackedSize":136938,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIT6ExhsquGFTVl/1JyPppc4+w3p6v8SfcNoey8hBFugIhAIv+3m4XSTH2ApU8bLXieTipVej2WzaTeusbvtaA0cLN"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUuZaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrUWQ//QbbGq5CtZ6hgBrQcTUHZpiJ+PM7PJsc6cf/roiwQLY+2e5nE\r\nRVDtMR81OySA+nB7MMWv4ML52cC1EPXTmTxFNdo7gtIYPP9k8MK58AdGKdDV\r\nxeLfT1P8Oftx1naiYDU8MWlSK75Uv0f1Zm5IXmqyMy5yCG7wfUCr5r7OXr2Y\r\nuPyOauC49sswR3V5vvQMp6z8I+xHWs8jWVPmYDCJbbw2bdmgsoCr0yVg8c9j\r\nvOi8NsVwaIWiGvq6ZV7jbVGtIwtl5P48N9RPBtvN0CC3yWawxnv/s84FA4JG\r\nVVkGS5hi8l6nMjWBgBix0okpYXU6LJVPnLVnYaBFSP9HsZZbaGKEmJS169Qu\r\n4T/gYyY/NscCGnKmLCbYPlKVuJnFRxIaISCn6chB3TpdY2AfYAcoCDx7v4ee\r\n849kjmdyhZs7CvwB/DvDIzNm1l1D9qFpmFC/o2qV8vG24MpnkO2Qpb2bmNet\r\nCwqN2MoPFKamhYoSMzGI7whpncjlt1uwHMCpV0WWqGN8ePT7N2oOvVbKTM8L\r\nk9/ivWdaW8lLyyGrCZCjklajBCBBXfHbjk06xL8lVPbo729OpuZAdGi4MclR\r\nvwf+wwlecqr3M36ZIlB0kV8xT/fWCR4UKwAlkmJX87eQ9T4cp0i2PuDM6OzS\r\nCKuSe01CmX/aDhB9yWWeEULATHKx2Mts31Q=\r\n=HlCq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.18-alpha1_1666377306481_0.5381628302026229"},"_hasShrinkwrap":false},"2.0.19-alpha1":{"name":"@rockr/sso","version":"2.0.19-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"f905ea41335dda37ce4de486c8cd895eb45f0067","_id":"@rockr/sso@2.0.19-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-Bbjf8td/0GC5EPBfzQSop8ZED86pthaJehHeyFd2OP5TvnbleOD4cb1K2V0L12xUN8BHHmP2i2rZJE8NV6Q+CQ==","shasum":"e1f83eda07f90b4f614961155cb52ddc951e5a98","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.19-alpha1.tgz","fileCount":46,"unpackedSize":136728,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3no4BhQwIm0nLi6ELZOydCC6QslyQv6htPru784JJFgIhAJa6QnP75KQMKTi3OvDFonivL7Np3WimG9U1Z4m8bBTe"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUuqRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrATQ/8CaEzeVvW4xTO/N2tS5R4UBjDbfRhJNO0dYcZYOzXIqM21SFH\r\nH5HhoaN9c7EWGgOUg4dDiCy0nZoWIQXWUMn0Y+wQCR9vLucF/8JJT8H5q1rn\r\n0n6dJM6GFwY2pqUa5GMBMDgEdu2pSDDEQdNfrvQNZyMtcD+r189YEsUjSgyJ\r\n5DOPl8VPHFnd60chQDEvKa/N67iKfU54y/xOYmAnfKqm7/AaeiTyMMeSPuEB\r\nokerMA4HmOYC/r2nb/hbEJNidKippnyxi+bXHjqAQQCtfQ/jywbvVOkqmXNT\r\neqyyGOAzPUaGfchnsEIwcTQt1FykmSloKseDU3VVfOmRxjOYKqh/dMozEQhE\r\nts6HXHWH3YyOnavxoD0+bPJDvDm9SOJfN2r64l2roqg0Awmc4OjwB8gINwiG\r\n65tENhd7fOS7tAw+o44e3RT2bpI5WOZpngOHvUpHypHsuWgkZhdqTn/O3WnP\r\nhI9uSORzOt0Nxce+E07qCuIgltUrDg9T/9zTw1RorQU5m5H/E/DHijlU6OT3\r\nfNeNJqfgR1COxrYw/cJ1HWuQoIEKyW9tvNmyoOtUPyxDPdvZz6bVLLRvEMAx\r\nFZhNiu6XV1Fh7zWoW+4t80/Mfdr9XUXrYY7aiWspdCXBePABP2GCv0ZIhswP\r\nA0oZZlBbjWgWc9RphVw6bLCh/iB+7ocwpYA=\r\n=Gy68\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.19-alpha1_1666378385201_0.49265954607865114"},"_hasShrinkwrap":false},"2.0.20-alpha1":{"name":"@rockr/sso","version":"2.0.20-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"8a60c4ca4d4d523cafc3bde2018bd802d3dba65a","_id":"@rockr/sso@2.0.20-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-csJwFzmUhWiJ8b+KgzhWqz11R7B3RzYeNWZsw3KF1TX9Owi5VgpGaxS0gnIVjWIi3nHvFlcfwmCJJCtQ9OB4hA==","shasum":"bf8d626943ca3e761040f8bbcd82f6f59bd3cd58","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.20-alpha1.tgz","fileCount":46,"unpackedSize":136422,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDK72k4v+JpqlCNbxQWPvBB5P2MthKXX01gA0PcTn5D6AiEAzJ7jWOxuNYwR+gazXwm6+OCy37mLQzkJhinvme68q68="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVpd9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCYxAAgzIcQh5wCIONuaB9VMYNETd4WhJRPu8kXFzBG7mbOuw9gUyM\r\n9AbXMTYfuUwU0tmm1+EMKQdYx/8D8sGzkFgE+Y5eHh162im9uHE9edqOtOKj\r\nBNFuyau5fdkMx4OndHgaRLjQ/7nZNgLUNi2T55equARy7/oDIaoUONdpnHcU\r\n1vgomXf36TfNE5lu7uU29US29hoAqIQU4HhlA30lYDnefvdwCJG3JDD/g2mC\r\nbdmDLoT179NMKXxbqfwmWE5B8G7d47GmB9sTf6i2KNu6cetaHuGEQKgltRS3\r\nswsxVRXUdiz5p+OdZg6QbXGm/IK3rWLgMKudapPW6at4Xke0hr7p79iubcM7\r\nMxl0N7PBFsYfGJW2500twKyMhYFTDyS8tRPM3DvII+Cy+UcP68rVtQuc/ABd\r\ngSRIIdGKMJx8kJhWQQkVUkkjWzijwsUEljOggjqPDkXy74lOF9mzWrN8gbeB\r\nUhp8cBQxNVo2v/CEiW3KL23aTJj2wjndz1OwQ8qFBnxnUcBBb0s9k818U9jp\r\nLSGpjqOKvZYpgaT84xskJL6BUEriWF8o9QZXib8GEw2WZfwK5LxvS6s6alkv\r\nq8AqVX1in+u6ZdMWy4/79gp7Otf9v2tY/l+XmB0rY4M9DXmG5/Gav+Fpa+8o\r\nwIGhZeEwL8DO9yQfkdcKCDTj8+9OOop3PYA=\r\n=vv4B\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.20-alpha1_1666619261335_0.8219928834593093"},"_hasShrinkwrap":false},"2.0.21-alpha1":{"name":"@rockr/sso","version":"2.0.21-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"8a60c4ca4d4d523cafc3bde2018bd802d3dba65a","_id":"@rockr/sso@2.0.21-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-2MUF/SLI6tzOtvMvHzovAV22ZrcHjqQbMqzfFtXzxMVbSLSfJp+7u4t0nnJ+epiMv7HZ0eKmtrpIorD4gx6dlw==","shasum":"da180cc91324a54f8ebf8ee023dcc588f72bb36d","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.21-alpha1.tgz","fileCount":46,"unpackedSize":137429,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAshgahUkwzfn2DjmTwxaahSdsbmrAyLLaGyd6cMlBwBAiEA5qFaFE9rLPm4unQVyMADY83LZc7rUGMLAQfVKyngyd8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVqfHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwOxAAk93s3LGe8cKvphtD5v+FAIKyfKYo4CFxtZNskqatKQZeth/i\r\nbn3uZXsUKll5IUsiW7+eGgEW4yUEHCYwmF8CXIuRuDB5BXpqoAdAyGKAwjDO\r\nHnicA39Oh1XecS+RXeeoFwlwgX2R1HLrBHSyshh9QziehYMnG/zQwm3q51LG\r\nsCXGoxhrT5PnyM58TvcyBvqVamw33BAdlp2EUz8lKDQxl8/uCogd9kakCUdz\r\nFrfjvUxeAHeSQAA1rgeuei30zw8KZg79WGVX6zcbMkMpdARiuMJOVLVkRcr0\r\nc+Q8r1O9XBBonX7DVXbkhuERli5Gbb1igGQktwUA4SNmIwUPbJIKxeBP8EUW\r\nAFlieed14szYSnCEYRCPOInpmXgHrtgoXBPWYXV39Ko76x5WnEW28VXVr4B+\r\nCzpZFWKVn5jW6aIvdoG188lm7rEPnXbP1lNuhi4T7ozCRUUyLd12+kIiC8E2\r\nKTHcgH0X8vS098yyCi1j1NgZdWMK8C+o+m/olr1bZ++4UAB5aXgkTJyBC3s+\r\n+rt4AhDdSRRiPZpj7JOIt6w7ZPmjFtjFW5sY8GrIA000EQsJoJjd9w9BNoxH\r\nWIFZJCg06WOpdUyaqWIkMKbJLRF+QrBCrvYABgGbICN2LoH4CJmY+zH9bs4g\r\n4lJiS+rDqoot2YqFud/F0AjX2yFFpNMSQVE=\r\n=tQmt\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.21-alpha1_1666623431146_0.4205966308674576"},"_hasShrinkwrap":false},"2.0.22-alpha1":{"name":"@rockr/sso","version":"2.0.22-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"7123fd4ebc4d1e9941893820a484ec8b13567d1c","_id":"@rockr/sso@2.0.22-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-Q5Pfpa54RW1Wuubm64UhAQpivFAvtPFgCY5q0I0eZYGmaVwMywEP3KBd8IMUNtZyHhY4uarOdV3yJU9MIC8UEw==","shasum":"60ad4f41e8f7fdca889388057f1665b2bd6009fd","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.22-alpha1.tgz","fileCount":46,"unpackedSize":139355,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEujyOCScpfnOZFxg7FpMWuOwJn0S6yn4qneOyj7q3jrAiAWZ3TLidVVbAuOoqAevsO7d/A6WEnS6UR+FWE2N7HuIQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVrVcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8kA/9GWo+OCsnMyB3klfg4LJ8F9InqDWagBheYakFuEbL7CJaxiRj\r\nA6plpvbBhPrgXHnYrCHFT0VnBTiqa3ooteSbd3Ew5gyLgTVil/VKH89xFUMN\r\nF5/sZFsXzzv0tA8B+0yPhHfvyShOrswveAdfmnJ7m3ZCq+zsROQSledsmpHd\r\nOaajDAeI42oqBVC+Co4pXlVYTpPup7VxWM2hWmsNZu8KeV2+6EkADUiNFLgR\r\nBwxff1GYRISsyAhqyrsS+um2OiA8LiZNxUyv7y59oiGliq6ahvDoJdODFw6d\r\nf/rV25tFdlI59kdp5Mr72UqjFaskO84bXeG/5iOwTnKnr/SoDoo09Gt1tSq9\r\nK0LYsHqZ1BZx9oXCh4mHORP9NgM9gPxDJOEtJVPuMWKpbGf1eMrPVXKcDWoX\r\nxRxFnA8WNVoCK6VVNw9JEr0a3LyyeOLVGwJTL//K1LFKa+krwiZLXNoPZKjr\r\niYYXe30x/C2f6Rw6gPsxRVnQ3t210rpYOU6qFaelyrDsDZxzBKnCovzZV3v1\r\n/EM62A+eJNBHEnty39ZQevlFhVryN2nhgLGcQy82rR2SltNB2lKcTCSb6jeh\r\ndzCILRQ3Qj9SaiDWC9GQlBfR8AgDuAzR9kxCJqRcCVYdakzuE0h5lWaIQhK5\r\nW1N08mkETGla4gJoOjXxj139xtfH4ogh8Vs=\r\n=JU/v\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.22-alpha1_1666626908045_0.8235824621014449"},"_hasShrinkwrap":false},"2.0.23-alpha1":{"name":"@rockr/sso","version":"2.0.23-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"d14013172dc3c280b2f7ce225ce490c9b959bd96","_id":"@rockr/sso@2.0.23-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-9th2g3qMfbS3mam4Q5hsTGUeAYcEdNxH6xrDwaGal8NCqkcUMhZXcIoXECtrtznakZhOcnWIkwkPjaVPuYaFQg==","shasum":"d80d491e2ebda2c49144fd47e5e2715597b7c746","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.23-alpha1.tgz","fileCount":46,"unpackedSize":139701,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdZnDcEOzQbQNta1422jTN1ufeCJWfqsXnT29ql/Y52AIgBnM8I9Sfv4dbkIVWo7nRfLF6cezkbTL8ot2ex3UU3PY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVuOgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqyNg//dtrzVMTc48bqO++3JhBf7I235IwZoDJm4MF4L3MAhleio8WT\r\nWigTiW7IVV6P5B+JRBqpFUoNCgSq86JQKaKw7tV2Ugi6vDqXIdDM5JOStGZE\r\nVkwxXZ6lNOz5tImQR3dwoGBLigS1RRkliFJEalN6wyfGEX6GLZdet+OGWPNk\r\ng27SG+GK2Sl9Zc1d5QJ4nS5lTXdIqciGnsZ7kR8iJVdF187jtDil+BGDYV4N\r\nLp0X9vkvUFb+n4ULsWsNNkYGM/pNQOcbbNJfQRx5qZ4ceuWWbk7g137CChIr\r\nOvXP8rg3HuY2kakgd36ovzgP7Rj7rBkfRneZCnanrRwxZwj12c/NMW6z9K8v\r\nq0Ac1Yuc9CL4J/Yvs7fnZBZ1JMWiGzgG40v5l4hiqC7Y+qR9atRdI12IY/0n\r\nnPmTv6qQcgfa9GW0VDQEkl6hxCkGd5YunmXb/7eQ6TtPj0XqmsZ3rITCoS2e\r\nCYko+S3NWc7wY6uzCJV2cvNnLuAX3RXF5dvJltk1h0M6XW2jo1MdKTeabmqa\r\nvANy1eMoCaGEzS+UxkhPLPGMW0qv0lM4Z9dZd5ZVCu9DwcfoZ9Zo2Xorc2er\r\nuUqZiDAFuz9kNPDCw5jqVcNfeRj6b1TFGdAZe1mJJzBml031FZ3vY9JAaGgj\r\niQ/hU45sUoxkH3Ea9ByEvl9wVxyHJsuUHAQ=\r\n=Ymg4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.23-alpha1_1666638752066_0.783590234452876"},"_hasShrinkwrap":false},"2.0.24-alpha1":{"name":"@rockr/sso","version":"2.0.24-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"ab20e4d870774c6a6d852aec0c813c80b1b020e7","_id":"@rockr/sso@2.0.24-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-agal678Qc87BnTSEJw6dA3gfKlfbP4WHC5txWnTuUf5tqWUbFz/BRmB07ra8BmaFCefhivHoYuRc9fjhco+HTA==","shasum":"3ebd30fbb88db4b7aa5c6e3a4594aa1c80b5e3d1","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.24-alpha1.tgz","fileCount":46,"unpackedSize":138183,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHsAMT9Pv0a6qfeTyHUM4yaoOz7K9Vuq9eNuGh3SApT+AiA3Ao0UG64ORwFq3Lm89eJntxBHvJod4detb1xzWTuasw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVuu7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLBhAAlZ3a145k9z0RT1ovMBwESfdUDsUinZ79gpgTcbgaohnmjcD4\r\nyXn7slwFxzq9/FNHRBJHRTRMxxRLrYl4Lbj+5AXsLYQE94jt0ErepSztl5vC\r\nDlI//I1YzGBshwfKQxlQjbeFBGI9sFSUpM2O7v52imck11wYglaMb2D+r2FB\r\ngoabemHvg2Yew00nWqhaG3EBhO6BtlPcHyiGubhxwWqgjBNAJPG5oWPXsyLG\r\nnj4Nj7EHUdAXVi0CLYNHTahHOuenJSGSlt7K8jLAtydKkP+FX7R2PHXVyoEe\r\ngwTgg4Qp4g8y0zWc50qFYe5lwHb2fYzVURxQYyjUMPCdDaHb48tHmDwXb4uT\r\nxs+8UkOcujg0bro7rP4iS9NODFVuGCHw6D7v7Z3DhQ7nWZmZR6AS512lDoYq\r\nEUQBvBuZ3zgISp3Obu7fsv3pOVR6knoo1+Wa3Ul43UdJ66UopRtGDNb9ON/a\r\nsXldFJKJPSgtCRx9R9tKPZJmFqRh1yJgXtY3akxC78e2huM+3+MiW6Uwqefp\r\n3qDnuT3u+BDRZ25qgYdJMrXYDgWmJWEV6G3cEEY9ihKacv4tA8nf7NWKow7D\r\nFAR9gIbxSlJqEJSuMc8VLP9T/AsgOHcIfOetWb5GRwyR9i2Nauy1z4X4PKJV\r\n8YHU8lSdQCrNaZ8Y4f28WXHJTTJlJVsFYNs=\r\n=WMID\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.24-alpha1_1666640827676_0.034443304335710634"},"_hasShrinkwrap":false},"2.0.25-alpha1":{"name":"@rockr/sso","version":"2.0.25-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"9ca631e3f1d929f32a9e001a1260c49879ffea7e","_id":"@rockr/sso@2.0.25-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-PxKNdaXvi2KQbTMLbUY2yZHNgLDrV9OvAxCyXMZtxl8Y3DccRTaQC80vMQz7K1nfsOtF4RC7E5oaK0C4OrcX3A==","shasum":"2e8accf335f231dc44b85c4335b1f67f2c466e8a","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.25-alpha1.tgz","fileCount":46,"unpackedSize":138972,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDBNs3L8hQaaoERXM3IOYpWyTTgRe6qD8qjOybBPYIkPAiEAhGZcasgGYVWwU9dXDJKITsbsRlzqxhz2ik5jRTB5QEs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV/NWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpsSw/+MM243BX/Plq7P2DRqULZqCNqt+qmaxUmrvBM33ziAa60jJr6\r\nvNY+BTd7goEGpgzwZdMDO56z5ivBVKGDUYc5c2Q1aMy8A8sdT00zf5OcJ/z/\r\n9MUSxXtqNsL4MGqqiTmJk9eDtPobOtBwLTVQYvMNPOJN9NQrriMh7NvldKxM\r\nLFgXtxar8ZdRO4fUPpFwE0B1LqjT/2o4L6tmq3fJrkzZ8XXFd7sbhMq1G1aq\r\nUAgElp/2aL5sRvvWT1q3ds+apmk1uAKQfE9Xxw1LykoLu0pqIh/Y9QyAbzns\r\n/ZycY5nxYET5l5fvPsdEKFX2i+T5897HxkEPq+arspoCa7InnVb71okskKAA\r\n7VyGjfekST7dQr0Ou1VH7qjw3BYPzfLJrd5sHSFAGc+btkp6vzwYddVvb5zy\r\nbFbjt1EWTygazjS/B4JVBYQx89Gj20XPPfsReEy79IjoCXeSiBNeakLoVUil\r\nmr9gthFlut5/ijoK7fKIq6zcrkAlH6QmcK+oHZjiaf6lEfVA8iC4FER/QxqP\r\n/82yA8bq6e/9PllwDOnUC48hoJktcyYjL9JRRH0j5GnETKbsJ2zxHYeO6VWJ\r\netlrBKXGbVIyjzZ9HakECyTEpTSyrxAp47/1FdA7oleY6p6JHrjTlI7mE7H+\r\n0MaVQAD47Mnri8bPrwRAZzYUwFIVXCIh7dw=\r\n=ASGv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.25-alpha1_1666708310624_0.9922395838227098"},"_hasShrinkwrap":false},"2.0.26-alpha1":{"name":"@rockr/sso","version":"2.0.26-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"91bc135e4c9d04ac8515ff1e82bf4d7c4115d00a","_id":"@rockr/sso@2.0.26-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-IBlAtBkluxHwTzMAAuqXR34pjy6BdA1IE2OkX0XfNESVMgRQtVtSdL84sOjIiO3YZquEA3DPxuoS5iyjKIZRUA==","shasum":"7b3d41bd53b86957fb8748922c5a4b7a7abb127f","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.26-alpha1.tgz","fileCount":46,"unpackedSize":138824,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDg51KbzuXBybjTOvq/aUDnvrhAXPWeqU5eTIHlboVbGAIhAOqC9Db3sy/4anZMJu4i4WKwPCWr2ubh0GTMtCvD08SI"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV/mZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqSug/5ASFQGpxQXimBUcr4g1Cfm2xdFNWPJBlE1Qhf9vGSd3nKr1Xj\r\n782eCsFPbKgAcm0M4sYW2O9uwAFgh/utYdwLubtFoYvD1bdQEgaHWwB5NDjq\r\n/hH4RdLCW2YsorlkhioPUSeYjYAdxPrDILH8GGv+OUAeVJeWXoxr1EUmujTy\r\nmrW0a0b5swCTGAyrgttNmokQS6/xZdir+ls3Uz2GWQiHr5XnyI9mYcuKhKMK\r\nNPiBz8ovyRAOKfNOYZ79rFrD/jy4r5zjcfbooyIS/lg1vAdkHf7udx4lzFfw\r\nunJEGbTp2n9sVO2hiaYB32bK+L2epCwaukLBaaCY68ZR979wd0mJqe13P6/F\r\nkXnq1p4TmfTeyYjNIWOK5TO7vjjoc1rU0y9S0RJYg0kl/OriANVIxapoEG9i\r\nnHjzF3kE15DT8h+FjCo/NJDQmMfek+oEM1OEIzKz2fsWisqR4cEuqD3UEgOE\r\nRWIto3Slk8K95XyJYEwY6Fu7ooTdIUUt7uPYQIHOOQUzaVizCUjhNUauow2G\r\ngYj1Y/FQXvLTTcvbIncuquniYMS7eFnyt5griNNsZbBEk8mCl3ZVrWLnDkMJ\r\nztrmCfzQ1knanWnbR/R5aJNsfwIN4kYKRYf5WIw9CNABqixDpiSIL9V4M1mm\r\nsRwCWYiHD6FDRp1yjj39muv5SUDafCxUwi0=\r\n=v/yk\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.26-alpha1_1666709913302_0.7383022064045002"},"_hasShrinkwrap":false},"2.0.27-alpha1":{"name":"@rockr/sso","version":"2.0.27-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"2118d8fe7fd393d7598e0c64eacec0b301fb80a1","_id":"@rockr/sso@2.0.27-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-QIrTDsJ/EtTjtqjAhB6Q7zFb1Z4V/wc85PDoS0Kj66bESLwWLOLRfF0AMxjfOTytTFN6zlmC+NyMgfs/h2znaA==","shasum":"5b334115e856e9417f5c799f1ba7bfb205ece7f3","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.27-alpha1.tgz","fileCount":46,"unpackedSize":138624,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZ3UTaC8vETuKVQIALuvcBq9R0ufAuauTFWk+xbazoNgIgKA5HkWjHbfPoCiQ8tFT4Bp6cULU+QSCnE/PXxBFk+Lw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWABZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJXA//bd7WI4jBhxWL4RRlNPw49kYd3Xe+fRKX1lwLPbfmEF/9TBsB\r\nBKDR9eGec3boYbeIL0hE1suK1hhNyfoRdKD5fjEcea+1HbHZKSHlgmZ6WMu9\r\nc0l/4WNbgwG/U6u5VDVTVKgd5VkH+JMkLnmM9cIULYAJJm0mTQG8GgBaVHov\r\nm6oeTuMdIxqup6zBKAkoNpKOUnHckxHmK5KB26tII0P9lM8c7vCX3yoqkrhZ\r\nv5D6Z2Ps4hfzX8fjRkALi59L6cvML5JLaIW976WlTOyzR9A/XfHaPtte/aPT\r\n2nPYqvxtf0gHQsBmpdXuJeyB35H/ArcySr74H7S2Bw4WWmyKvwbsprJoC/VB\r\nmNos4SAfLVedmBITRL/GfUgvvNEAZJu9hWjTrrBRfbe5DM78g3/k8q9YQuWs\r\nzscHDHtrA5j7CePpCApUir/zLmm3MmnnDak/98z3tHjv07jrC5T0QpzweoLO\r\nITfgMfKuCO3pJZj9k8BFKUIa8ONX8wblqLTVTU7pVImcYGrRQ+bs6jO399oI\r\nNlzMelJOlxNMooit1C+J6HyDy1Bl7uPWWc0MkQiSQSfvtPW36ryB3AQiGN2f\r\nPbncpEu0gfux3BDAyQSF1TjGRawnz/mt3+ztju3QFzCpMVt11ycGvMCIY7zp\r\nlNPAk4yJ02erazX0GpjHSrmuTs2Ah+cedwQ=\r\n=Tt0d\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.27-alpha1_1666711641330_0.18283405506179218"},"_hasShrinkwrap":false},"2.0.28-alpha1":{"name":"@rockr/sso","version":"2.0.28-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"03acbca5bb6f129bdbd9b0f3e8e450d2c27efb2d","_id":"@rockr/sso@2.0.28-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-n8F+iSpMm3tOQs/XE3byx36Nl38x/mTa3OArYTpcLh6zoVZPlXiJx/JRGTGnokbo7gZZCaHiN49xQOhUHVBtXA==","shasum":"617f4a2d482fbd5da602c184ede491b63a16b3e4","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.28-alpha1.tgz","fileCount":46,"unpackedSize":139645,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUrz8rHTtu4e2bnFHgy2kk9n5A0aHr18TiaYWGVbWiPgIgFnaBZQ8oiYQVyTM+uo9nYmYIdT9jC+BcxY2L6Z31cIA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWWowACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYmw/+LlwzUR1pxQVR9Wn23Q3Pq/l9pcpcVkYdBO23DWJvWP4N8Org\r\nteCMx86roZQMeNbtpGRhI2MOaHgWo8bOvuOfxEw+bu260MHyp3oUGmra5IXs\r\nD5nq0Tchk28Sc2pnVbAqXB5dkhekMe4vHoVmgq0tYzET+hfoGjjn6MrQgbCx\r\njHcXuSG4CYDcuinz16wemJtUVv0Hs9gf6gb+SV1ptmzWNvVzMmzK8oTg/1Xi\r\naCU10BU4FFyuP1vdtpcODPOhyDParOtNE8WydGm/OKjQBJWKFLIJcowvEHBj\r\ncpOfw8O4fCgw+91+qEF3taIzI6v7h5riNLbueO/T0ADIdl1USsuEHNLQbQCt\r\n1RD31PwU2bi+Qtx3Bdar7iE0QE26dMaC7wOxjDnLL/0XhzxZj3u7uMravRmN\r\nvYQ1/WwpOE9eVmYpNQir40tceKBpvWpL5uRA+YrUeXRpnsbRKi3TTMOcNmX/\r\nwzAodHsSkQyScvi/zIHt/3yoG50Btq9MEUVRh0I5443el4hcE19NAPpaAaqd\r\nKw/2rWKeY1ZMAik+7+E4hC+ACQw7kQ8j9+pHIroRXokyc1mHJ7vNuKToQH1/\r\ncY3FOxWkf7RiIYCkvSAB8RWzJ0Oy4XQg6r1YbfLQGtyq68FnqSHpd69f8TlM\r\nEz3P2fZNqTBzKJRuG+tI8ey6CPFhDVBVJhI=\r\n=7tiS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.28-alpha1_1666804271766_0.7098523658541815"},"_hasShrinkwrap":false},"2.0.29-alpha1":{"name":"@rockr/sso","version":"2.0.29-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"e3faed99e9b1de5072fc68d8ca39fb45bdc07004","_id":"@rockr/sso@2.0.29-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-CjE7jnr/eKDwKre2JsNDZpFEHob2uVtX5KSTtpHdVLPP0Lu8ap5NuMeamPR5yyMdf0yI8woCFZRtsb47fBTGaQ==","shasum":"30188918bcbd3cd997bf35292320eb257d37dc03","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.29-alpha1.tgz","fileCount":46,"unpackedSize":139063,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCq+XA0/7GBi230sPJISZvt1Pik/f8739pLa/hfcWOlOwIhALz/b8s+4wxfmWTfFIZI++qIK1b8o47F4WC3f3QqXJch"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWX+gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1SQ/9EjrCTbP1NP7wCZ2i77lLO5k/iBrnQqTC0prhzqa63W8Y6DXu\r\nu7Siy3/CjNpHRLAlMQzwUBUwvFtQZtfcIVpNmkHlGOyuXzSF4KhKUxE9ONm/\r\nnBkHUR5ULZpeZBVY9a4tQ3hAc/ibGPQP8RFGI5UqKTr039lMOL1/NTYVJEZW\r\nEb/tzZ0/EL0yQP3tIBM2cKc6eCMQD78Aoha69JaARg5g4f8zfhMwrssAKJiq\r\n7gF2Jb6XbSaMckPw/K14o1XNHXbLXGZuJqFHhaMdibyCqUTW7j1kBZx5zCQ8\r\n5CBG19O848r4ecweihceObK8S44UWzV6scdwNKmg6pdiaDxUTpKgGXoBC2S/\r\nq69gJm45plUbYhBWLxKWkZCYJfuORQo9PgNVfi2MJtfWlzo5O9Gg/ymIhxtE\r\n6w0sCTvE+YiuF0vLOGzmDoqYWG+p9MIj7EbGOqpcV27PwIz3jzqVO2NrKNB4\r\nS9ee+7O1IeoizSHO3xVRi6qBdB+trbvFryRNkfiRL+NA1LcC6vbiMK8F3i5M\r\niYNahbPLOHUqhvVoikHL42528DxghddtyIHFfCdm13o2QPEkxZOvVSNftpPk\r\nlgvrNxGj1VtRUVgOKCg8uiUuzgCfmDQaogb13aLVzOwRGoy1wwkR81mAFfmq\r\nY66ZTvF9XxttrjodB8aNOZ1qJK1ccGCou/k=\r\n=jBOT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.29-alpha1_1666809760630_0.9524486012324604"},"_hasShrinkwrap":false},"2.0.30-alpha1":{"name":"@rockr/sso","version":"2.0.30-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"e3faed99e9b1de5072fc68d8ca39fb45bdc07004","_id":"@rockr/sso@2.0.30-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-av1xe2KpUjg9Q6DMOfZ8aRPMevLwSpniAyMZkANCqm0gZIuczny4qH9TlTPVFIB8Ofznk7O4QdmjrSRmOS4yvA==","shasum":"0ffefa0aabfdf5fffdb56132413760af41a4fd82","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.30-alpha1.tgz","fileCount":46,"unpackedSize":139074,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuOYjdsuFFYFN7APgs5fa9U0SyS05Ez1cs1CQtMUpN/gIgbtNB5WqISWIBVZy/slLi5kyynRO75/9krDSdEfCCbf4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWZ1yACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp68A/+Ju5zbMCLc7lvgZnwx+48TEoPjzQ9SNn4NVk7GRx0uMhFXPGa\r\nq8Ekrb6oRvAYVItGjdAF0ts3/oCGoPM14JOKNVy0Me2gFCrrypI5t4uRHbLZ\r\nPErow66cj+G4IMUPKcARSsSCxaq2GuptVqXRTdboK/arE8DsSDwpldpVLOMX\r\nvMEZekOKX2rs7vVTRP1VLrSYtkTkQpNL7MSWWLK7ZuB77UaPDiSE0ilaRIZE\r\nRK5c05xSOjyVp0iLPiU/284I6xojoToWbhhuS55I6U0xfPSmZmgihz+oUj/i\r\ncsCPrnVra5zYVpmmnpgc+q/45XWIeRMSAqUgRTymRJrFnYIgsD8hIaV0OKlI\r\nFjgF8LgJOV+t+gu6s9LV7RgsFcgqnyD/a18Ns8nBq9FWuC745cw31/luddlm\r\nZQtF11bks1YqvcfqyGbgKipHrlELZ1Sisxbz8UM8fF3d+mPwnrBbBNpY7Hlc\r\nD7ziMphxyANGY1LYTJgSL+NuqgkXa0AUtXsATVBar3UtEHdZU820yzAUY7oJ\r\nEoxc4L0qBcEt7YsKQHZejrhNBTRt7nC2HRXdBav67xo+lujwWNrLlzGT4w6S\r\njPfhhZ58b0m8QoVz+SKvRZBLGfEQzKVD1z3JZasukgUydhhG7SUt62+ODA3g\r\ncMbsEdPuX0OZ5srTfO7JRDKdLZ/JfsFOy0A=\r\n=46+2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.30-alpha1_1666817394251_0.35539449399594725"},"_hasShrinkwrap":false},"2.0.31-alpha1":{"name":"@rockr/sso","version":"2.0.31-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"e3faed99e9b1de5072fc68d8ca39fb45bdc07004","_id":"@rockr/sso@2.0.31-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-Volj470Vc5SlaOp1BxSRzagOKz17NqrLKQvr8Uzq1VxvX/mvUIWXeFpvXFuKxGIIG7eXkFEdev56R9Ubp7CmhA==","shasum":"d1b7645069c99fb4e5903fc421655e3bb5d1b75a","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.31-alpha1.tgz","fileCount":46,"unpackedSize":139063,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDhXkxNfnjPAvKo0mZB4R70d00CZhgUueepCzbU2j8jwIhAL+zoEx4ZQA6UlEdXcUFEO9PElNiwOtwbWfuG6/HMAfg"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWaZQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZJQ/+KF84CweWknnrJlBJQRXKfukaaPc/5/nv83t7bRr5nxb/vCsl\r\n7DjTSX7zoXggvMFZj1hb/pq6SThcEYhMsMZZmh0JaBPz0l9TvEpSao9F5scx\r\nM2ZTa/0+ldryTtJRJYPdW4I1d7X7IR1ejxHuypSR5qNJfmZkTKeuu5gk6bVD\r\nVhGo+mz84PjpkqbsdGmxZjN2i2NE7h+TTuadZsh6BwjB/smg+q/ipQmQENZ3\r\nbvgi9PLan1BauOSoilpFQkVEfLQuYm0yRvFvu+pxWNlFWIBKt+j2+DDdXMF7\r\nNglXAGJyCoVe3yzIV6O+If/VKcmjQpQQ7XHjOupegKzh8LD93M8SAEc6n+dF\r\nPTANmW3xVwVgd1AsVYID0q8dYtbJ99ylfXqHsLM2j4hHVFaRAQqIS7eNKva0\r\nA3OMMsuwEXkGQ1G4gzg84UuIPpuSTELoYMme9UXM9C5N1iztfs3kG/aXcO5S\r\n40g/FcAyKml3oVj4yhByZwGsaXDWtyKEtXe7NFc3tG265sz1gaDtBxSeqwh+\r\nVaTVxs2ZUZNfVldg/607tSy9UAdRPh2+RpJyfqxCrSmkI2L4vL4KgW6cLgzm\r\nWwpP1pLsMs6UweMPv/OfCMjeaFhwdCvy7Oz8URwq8jpqiCBWa5p2C2WS30o5\r\niG5oBcjW7IUgvQ9KTnT16Hwxp+WG4rZ1xsw=\r\n=EQhn\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.31-alpha1_1666819664408_0.4504255385012925"},"_hasShrinkwrap":false},"2.0.32-alpha1":{"name":"@rockr/sso","version":"2.0.32-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"599688fbdc3f3c2f76d29f44f96d6b81df7e7734","_id":"@rockr/sso@2.0.32-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-x02Y2Ub6M7nJPaLmKaA7tFc/yHXGs4ykLd2sWBtnsSWIMqWjq4KF8BUEc8rz9bTpwVCweuDWdDfUHCE9mLGIcw==","shasum":"3e4ab7fbda69518042cf164d3b4442f33fae7ff2","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.32-alpha1.tgz","fileCount":46,"unpackedSize":139139,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFUahMX/j+ZlQhAYMlITCb9OyCFdSahdjXKzxaVPhDZJAiEAs1P8tHb9DwAApGhnPFo1K8e4IqzZZE2+Zktbrr4Mn6k="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjXEdOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqu3RAAhUgVp4naZNrt9jAVgHDRVwQPxy61jD6XHhzJkU5ylGEUCK2q\r\neVWLMbgXn327h/bYxdGxuvk1DTplH2bHl3q56Jv34wGLLyTrau+YFvswHdxb\r\nJXC+/KBmwI6P+uOqB3cRdqZQ1b/lvYbXq17AwLqi2O1My/hbpsFU8a90XlJW\r\nTNUIrUKBwyofoKny1gLlchhBgtW1QffR3Wb1WvXBY893xU9YXknpZ/XMX8e4\r\nIXd3GINDbK9Skn0lK2yoM/0+E+4o466J1JH3h8Zxd7EoEpBGbITHec9FNEBL\r\nYk2HIU6RiP9c/gbOFbnPmL6Xf2yb5jNZMqAcY1Rh7NG1MKemfO7xr84lN94b\r\n6PDiWVryIANk1OeQbyx5rTIRdmPaR3ZWnSLA+JUV1LCJ+vKVrfMmFDof6fOA\r\nOjS/iERkJfUZySJ+VEvdUTUvjZOe1nZy+RH+W9nv0K0YngLTfarzlXk0u4Iz\r\nvrpY+aAO+dOyoruhOmI5MxiHdF0GmzMjkL7L0kKXj7U/2Go4NbvlnkRDIhXM\r\nxJBfTcA2MXZRjqvNACFGbAGTmLGLYjpTMem3BrNDBNetxGPaKM0V4Z6WVbAV\r\nWqAEFZB0UMcihkHzGJbatdrRr6Dqi2k0kO91ZGHyBtB49U99/hGoDIfVluPa\r\nJ4ysE+mxcmzq4ZeAWewW1zUe21XhpLyZCAI=\r\n=0xYm\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.32-alpha1_1666991950702_0.6447963585674721"},"_hasShrinkwrap":false},"2.0.33-alpha1":{"name":"@rockr/sso","version":"2.0.33-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"7dfee296a2310112e7447dc197d26ec487a5362a","_id":"@rockr/sso@2.0.33-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-Kt5raDSqGcp/u6CRW4+SCyQAgEFrOJ2gtGUo0ZVlK3bw2nmW2TrRnRbhcbzc8Y44ATFwk4WqwUpE4ojIA+aJBw==","shasum":"4f8a0c1223ad9247d3dd011b20e8ba3a5ff2c6ae","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.33-alpha1.tgz","fileCount":46,"unpackedSize":139433,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGFFC3AXV7MH7R3KzOPfaJlU/6nj4Q5pm7kx85cR9l/mAiALudj3yQjU6vAvyWqRjfLjusr/xU8j4Y+5BbMVNbr77A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjXFfGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKHg/+KRrt8PY4GXV13mBwH5KokJh96W3w5ipKeHlN5twb0lUOilTH\r\np010lfNQ1kj8w2wpmPNMOibdKC5d0FSv9Zcyztu8Nagg3+OLKNWZxF0HGdvc\r\nbn8nWhcZiHMv9yXTjUc+axWW8LxuiKGB+9EdhkqssI77tUv57vpNzYu3OZmJ\r\nZYUcMdoPjRgk7KJbgWGJ1AaIEzlc4A/ak5WGrCXt3wrk1r/EFL1PFv2UkN5n\r\n6D6tPUqPsP94Ce5dcRbe5h+6F1zSnYTnpQcagTBb7yWGRlwB7nLlA+wcBt9E\r\nsEMb4hPizEZIapqV/2b2Ksv4lUKEFiK8OBV9Luqttqj5PKyhxxphDW8QL2Ur\r\nSoqc1x3e0SdrmtlTQRD5xMWhCMAMwiPsWSzWfgsR9PyrDDjpuQzfpGSfc+/p\r\ntORW3wSR+ADNF2xRgdX7dMiwC2/OSqisTTl3bS+2B32SiraJ2gObrhJiKCql\r\nGkYWWQPJzdUw5tdydbzuZwUQuzUX5JwJQmlB3q76DYM5aGoMPPNvq3f+M992\r\nW2FQTRe4SbPSUIM86NwHD89F1tjS+qTv5nzrtIeO/lp+cPOs+kfgUqMvK+/R\r\nDlaJrkdM/QJCEc0VMEQi7T5roPFJPP6VqZyrbQ9qIMwkZP/rR2gKz/jx2Yga\r\nZJ8L1ovVjYCQnu3w1qPOqCSF6fhEaSlnd7Y=\r\n=LU3F\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.33-alpha1_1666996166426_0.16508166302953664"},"_hasShrinkwrap":false},"2.0.34-alpha1":{"name":"@rockr/sso","version":"2.0.34-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"0b2695ab46b164f4151a970a4b7f4aca667ff927","_id":"@rockr/sso@2.0.34-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-Qpp/mcRTGGAU/gHDHJdA5RsuU7jETgyFISWAHRytPYSDu7jEFd58aZMJ/pINymHYy+XSacjQCodmfSv3qi175w==","shasum":"a08080b90957fbe49ae6338d26eb8b25ccf4cf61","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.34-alpha1.tgz","fileCount":46,"unpackedSize":139709,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDL/lhRuiv5Lz2Qbfm7AkHwXzaIh0GgAm6vfrEbEXXu6wIgbHLRZ+TseAvyyCtFphcm14UZHKbMzk1GFOmMwZ5rqwg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcoBUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqeoA//XMhp8IxWna6s8QXxcxh9NrpadHJW9VOEGV/Q5a7ZJ+0pa1Cf\r\nYM/mmv5UQnQOhHfm1+d4OqOxSbCHzdaUdcVewgOJgOO2Ut0kDOKGmQPrNrqY\r\naTzNe8TK8YopK7Cl8rApi5mqcPDi5/3WWeJZ9mRqz1mKY6F+OrO32P+aCrLE\r\nhE5XGKGWo6apa1wQzyPLhFAuEn2ZIIi4n0xy5S059qfa+IWlcR+xJfdhJhoD\r\nH5qFY+rd14bHGgfAg4uP112leiWBwqLMIqeGU+s/CD9Obhhd6mGR9TENNMiV\r\nFijt09vfUDJr/5uzleUgFKIRgBU3y9VZjLZfDvCYH8sSUo4/2WL+erErv0aS\r\nIsdryzPt94/jEjKBH3iHSUv87M2YeJdojn2PZ6Woj7B5wzfGI+Iv1g/mMBVS\r\nwV9SqK4EAfmB94dFfLJ2jL3rmawDle9DYHs8OhqJ+1vZ9A2aAh1Eno1mnMFO\r\nHsgpcXX3ZLmMeGGZULeTbFAXl4jCWRK5itxIuJE9q5kahPM7ac3IOms+voC/\r\nalL/roKCfgXoqd8wLcuJ+gjlCSrWZZyVM23HWzzLySrHGejzdMrQWP2Vsqg5\r\nKWAS28vfuIq30xZkNpn7tVZtyWRCUucnlQBR8uUFD0MfPqtz9H1CPMZqpM+S\r\n0qfJ1Hn000JXhT1+jAWTusljns6NWhUlXtE=\r\n=A02V\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.34-alpha1_1668448340222_0.4603614928464943"},"_hasShrinkwrap":false},"2.0.35-alpha1":{"name":"@rockr/sso","version":"2.0.35-alpha1","description":"## Instalation","main":"./dist/index.js","scripts":{"start":"node ./dist/index.js","build":"rm dist -rf && tsc && node setup.js && browserify dist/ --standalone RockSSO -o dist/cdn.js","dist":"npm run build && cd dist && npm publish","test":"mocha --exit -r ts-node/register tests/**/*.spec.ts","coverage":"nyc npm test","coverage:lcovonly":"nyc --reporter=lcov npm test","coverage:html":"nyc --reporter=html npm test","lint":"eslint src/**/*","prepublish":"npm run build"},"keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","devDependencies":{"@types/axios":"^0.14.0","@types/chai":"^4.2.11","@types/js-cookie":"^2.2.6","@types/mocha":"^7.0.2","@types/node":"^14.0.27","@types/sinon":"^7.5.2","@types/sinon-chai":"^3.2.3","@types/verror":"^1.10.3","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","browserify":"^17.0.0","chai":"^4.2.0","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-plugin-chai-friendly":"^0.5.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","fs-extra":"^9.0.0","husky":"^4.2.3","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1","sinon-chai":"^3.5.0","ts-node":"^8.8.1","typescript":"^3.9.7"},"husky":{"hooks":{"pre-commit":"npm test","post-merge":"npm i"}},"dependencies":{"axios":"^0.21.0","js-cookie":"^2.2.1"},"readme":"# RockOS SSO\n\n## Instalation\n\n`npm i @rockr/sso`\n\n## Usage\n\n```ts\nimport { createSso } from '@rockr/sso'\n\n// It can also be 'prd' or 'dev'\n// If it's dev, you must pass an URL as the second parameter\n// Example: createSso('dev', 'http://localhost:3000')\nconst sso = createSso('hmg')\n\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\nsso.login()\n```\n\n## Methods\n\n### `.addEventListener`\n\nAdd listeners to one of the following events:\n\n- `login` – Triggered after the login is succeeded. Returns the generated JWT\n    token\n- `loginfailure` – Triggered when an error occurs while logging in. Returns the\n    given error object\n- `logout` – Triggered after the user is successfully logged out\n\n```ts\nsso.addEventListener('login', token => {\n  const decoded = jwt.decode(token)\n  setName(decoded.name)\n})\n\nsso.addEventListener('loginfailure', () => {\n  console.log('login failed')\n})\n\n\nsso.addEventListener('logout', () => {\n  console.log('logged out successfully')\n})\n```\n\n### `.getToken`\n\nReturn the authenticated user token. It's often used to know wheter the current\nuser is logged in or not\n\n```ts\nconst token = await sso.getToken()\n\nconsole.log(token) // JWT Token\n```\n\n### `.setToken`\n\nThis method **must** be used if you're using SSO only on you back-end. After the token is generated, use `.setToken`\nto save the token in the RockOS Cookies\n\n```ts\nawait sso.setToken(token)\n```\n\n### `.login`\n\nUsed to authenticate the current user. It can be used without parameters, which\nwill redirect the user to RockOS Account or passing `{ email: string, password:\nstring }` if the login page is implemented by the consumer.\n\nBoth authentication methods will trigger the `login` or `loginfailure` events\nafter the login is finished.\n\n```ts\n// Will redirect to https://account.rockcontent.com\nawait sso.login()\n\n// Will authenticate the user and trigger the 'login' event when it's ready.\nawait sso.login({\n  email: 'johndoe@rockcontent.com',\n  password: 'johndoesecret'\n})\n```\n\n\n### `.logout`\n\nWill logout the user. It involves clean all cookies and invalidate the user\ntoken. This will trigger the `logout` event after the logout is finished.\n\n```ts\n// Will trigger 'logout' event after it's done\nsso.logout()\n```\n\n\n### `.loginWithGoogle`\n\nWill authenticate the user using a google account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after then\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithGoogle()\n```\n\n\n### `.loginWithFacebook`\n\nWill authenticate the user using a facebook account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithFacebook()\n```\n\n\n### `.loginWithLinkedin`\n\nWill authenticate the user using a linkedin account. It should receive a\n`redirectUrl` in order to redirect the user to the right page after the\nauthentication is complete. This one does **not** triggers `login` and\n`loginfailure` events\n\n```ts\nsso.loginWithLinkedin()\n```\n","readmeFilename":"README.md","gitHead":"820cc666c025e89746125251010f475abd03b467","_id":"@rockr/sso@2.0.35-alpha1","_nodeVersion":"14.17.6","_npmVersion":"6.14.16","dist":{"integrity":"sha512-t2Hd72BhQd4/kC+tYGKd21GHxk5LM8NJf2b6oFnr54TdChbeH4D0Jap7Q9A+zyazqApvo9ZfKRVQmk9re7yVpA==","shasum":"9a9cf498c832cbaba75089d9c387234f70d20ba6","tarball":"https://registry.npmjs.org/@rockr/sso/-/sso-2.0.35-alpha1.tgz","fileCount":46,"unpackedSize":139415,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGU9zeXI2QNiRDMZOpJ/zK17oQmMsCWbY9cHbSRSn183AiEA5+L3rBvYibfkmgLe+OlrKgqcxRxs8FcI5EXQlNSax14="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcoowACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrdQg/+Lw8J5qrYxnMhlUY3d8iws85X6CUs5v4mSvmryu8JwUaJN0Yt\r\nZej6m4/S6BzZqsucHTjX6xCfoPKaiKHiuJ61C/7hvLxCqzcaf31Bp8xsCHky\r\nMaEUf5+LUrDiTNgwCi2rNAn7gmQNW7CbPeg8c0W2HAmR5Zy5rQiBy8uoiIuu\r\nou/S9xM4YAPRxz1/wbAAXwdb+rnddm0ZhBNjsVGnh5WOI4EMBK19luds2ruT\r\nwgEa02gH/njuYT2yVXOPtllf7+vHu8/K57IsONKOCmfevImLzQF6b7j3+lOq\r\nxQETg3lLRfeGZWR5a9Ric66P/vL/pQfSMuvZXRcKncBvhidHzDM+U9J2btEG\r\nloJ+ZYn+M847k5mR7R3UvHcWeqFO99tcOu4neWqCYUlRArDKk0PzOsYUf7HS\r\naBfj75Qk60yRS1teDqQeAIoA2uHUTFX6fejFOEn0PtNb+OAGTv3POg8UQ/j2\r\nCRGqr1qbKHT8y2Yq4n+BQ7iZ0T5cfACE+zLW4mG0pZja4Lj202osIcvJmABy\r\nKHYGcrsfZY26xVw2bs8NrTjZZ7T4j1H0twwz+Rw9stJC8P4WLT6ZKTT2moGy\r\nQKEk68FVNtEq0Jgch9sX1uVhP37rUmZ3F2LbcgybyQP4X4Tnrpboc5v1LMj2\r\nUUi5eImXmYg6FJr7MrWXcB9ASBGg2JYfbaQ=\r\n=/rUC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},"directories":{},"maintainers":[{"name":"rocker.leo","email":"leonardo.azevedo@rockcontent.com"},{"name":"tuliocmp","email":"tulio.martins@rockcontent.com"},{"name":"andrey.leontyev","email":"andrey.leontyev@rockcontent.com"},{"name":"stageteam","email":"stage@rockcontent.com"},{"name":"ph-gomes","email":"rphdgomes@gmail.com"},{"name":"renatojunior-rockcontent","email":"renato.junior@rockcontent.com"},{"name":"felipeferrarini","email":"ferrarinifelipe@gmail.com"},{"name":"felipe.oliveira","email":"felipe.oliveira@rockcontent.com"},{"name":"henriqueweiand","email":"henriqueweiand@gmail.com"},{"name":"maracaipe","email":"maracaipe@gmail.com"},{"name":"kelvin.chaves","email":"kelvin.chaves@rockcontent.com"},{"name":"rockcontentfin","email":"contasapagar@rockcontent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sso_2.0.35-alpha1_1668450863983_0.47993674400008146"},"_hasShrinkwrap":false}},"time":{"created":"2021-04-06T14:36:46.549Z","1.0.0":"2021-04-06T14:36:46.727Z","modified":"2023-09-28T18:37:14.241Z","1.0.1":"2021-08-19T13:49:08.623Z","1.0.2":"2021-10-14T23:11:05.197Z","1.0.3":"2021-10-14T23:39:31.982Z","1.0.4":"2021-10-14T23:44:52.380Z","1.0.5":"2021-10-15T19:50:09.003Z","1.0.6":"2021-10-20T20:56:23.502Z","1.0.7":"2021-10-20T22:45:04.612Z","1.0.8":"2021-10-21T12:23:25.495Z","1.0.9":"2021-10-21T14:08:04.685Z","1.0.9-beta.0":"2021-11-04T13:40:31.342Z","1.0.10-beta.0":"2022-01-13T20:49:41.902Z","1.0.10-beta.1":"2022-01-13T21:43:23.314Z","1.0.10-beta.2":"2022-01-14T13:38:40.022Z","1.0.10-beta.3":"2022-01-18T19:20:23.686Z","1.0.10":"2022-01-31T19:20:22.987Z","1.0.11":"2022-02-17T18:29:01.711Z","1.0.12":"2022-02-24T16:24:42.391Z","1.0.13":"2022-02-25T02:11:44.755Z","1.1.0":"2022-04-07T17:01:04.335Z","2.0.0-alpha1":"2022-10-04T15:18:36.088Z","2.0.1-alpha1":"2022-10-04T19:29:05.609Z","2.0.2-alpha1":"2022-10-06T17:47:15.069Z","2.0.3-alpha1":"2022-10-07T18:24:49.531Z","2.0.4-alpha1":"2022-10-07T19:41:01.954Z","2.0.5-alpha1":"2022-10-13T18:20:46.362Z","2.0.6-alpha1":"2022-10-14T13:36:05.874Z","2.0.7-alpha1":"2022-10-14T16:11:50.635Z","2.0.8-alpha1":"2022-10-14T20:34:27.533Z","2.0.9-alpha1":"2022-10-14T21:47:56.538Z","2.0.10-alpha1":"2022-10-14T22:28:17.225Z","2.0.11-alpha1":"2022-10-14T23:10:48.228Z","2.0.12-alpha1":"2022-10-14T23:45:53.618Z","2.0.13-alpha1":"2022-10-17T19:40:56.214Z","2.0.14-alpha1":"2022-10-17T20:30:53.612Z","2.0.15-alpha1":"2022-10-17T21:19:12.598Z","2.0.16-alpha1":"2022-10-20T15:05:40.265Z","2.0.17-alpha1":"2022-10-21T14:20:13.983Z","2.0.18-alpha1":"2022-10-21T18:35:06.703Z","2.0.19-alpha1":"2022-10-21T18:53:05.459Z","2.0.20-alpha1":"2022-10-24T13:47:41.555Z","2.0.21-alpha1":"2022-10-24T14:57:11.358Z","2.0.22-alpha1":"2022-10-24T15:55:08.292Z","2.0.23-alpha1":"2022-10-24T19:12:32.278Z","2.0.24-alpha1":"2022-10-24T19:47:07.904Z","2.0.25-alpha1":"2022-10-25T14:31:50.829Z","2.0.26-alpha1":"2022-10-25T14:58:33.513Z","2.0.27-alpha1":"2022-10-25T15:27:21.534Z","2.0.28-alpha1":"2022-10-26T17:11:12.058Z","2.0.29-alpha1":"2022-10-26T18:42:40.797Z","2.0.30-alpha1":"2022-10-26T20:49:54.451Z","2.0.31-alpha1":"2022-10-26T21:27:44.550Z","2.0.32-alpha1":"2022-10-28T21:19:10.911Z","2.0.33-alpha1":"2022-10-28T22:29:26.633Z","2.0.34-alpha1":"2022-11-14T17:52:20.413Z","2.0.35-alpha1":"2022-11-14T18:34:24.134Z"},"maintainers":[{"email":"services@rockcontent.com","name":"services-rockcontent"}],"description":"## Instalation","keywords":[],"author":{"name":"RockOS Team"},"license":"ISC","readme":"","readmeFilename":""}