{"_id":"@anxing131/casdoor-nodejs-sdk","_rev":"6-c7577afc974ff1a8215adae70a5a8352","name":"@anxing131/casdoor-nodejs-sdk","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"@anxing131/casdoor-nodejs-sdk","version":"0.0.1","description":"nodejs client SDK for Casdoor","main":"lib/cjs/index.js","typings":"lib/cjs/index.d.ts","module":"lib/esm/index.js","license":"Apache-2.0","scripts":{"prepare":"husky install","test":"jest","build":"run-s clean && run-p build:*","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.esm.json","clean":"rimraf lib","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix"},"devDependencies":{"@types/jest":"^27.0.2","@types/jsonwebtoken":"^8.5.5","@typescript-eslint/eslint-plugin":"^4.31.2","@typescript-eslint/parser":"^4.31.2","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","husky":"^7.0.2","jest":"^27.2.1","npm-run-all":"^4.1.5","prettier":"^2.4.1","rimraf":"^3.0.2","ts-jest":"^27.0.5","typescript":"^4.4.3"},"keywords":["auth","authn","authentication","sso","oauth","oidc","casbin","casdoor"],"repository":{"type":"git","url":"git+https://github.com/casdoor/casdoor-nodejs-sdk.git"},"author":{"name":"anxing","email":"anxing131@gmail.com"},"bugs":{"url":"https://github.com/casdoor/casdoor-nodejs-sdk/issues"},"homepage":"https://github.com/casdoor/casdoor-nodejs-sdk","jest":{"maxConcurrency":1,"maxWorkers":1,"testTimeout":30000,"testEnvironment":"node","transform":{"^.+\\.(t|j)sx?$":"ts-jest"},"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"dependencies":{"@types/openid-client":"^3.7.0","jsonwebtoken":"^8.5.1","openid-client":"github:zhongjixiuxing/node-openid-client#main"},"gitHead":"74fa7d6efeb1883b724ee4cc260cf7772b01c048","_id":"@anxing131/casdoor-nodejs-sdk@0.0.1","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-pEgLXUxpvvrufQhma1IkSlOtDqRQw9QQ5vnDK5obH44Uqg0hVeQJmqEC5dhqY6s79ImNjnfz2yxRAEzB/YZzdw==","shasum":"5597ceb36d123c2bb9d09d29188bef4edcb3f0ce","tarball":"https://registry.npmjs.org/@anxing131/casdoor-nodejs-sdk/-/casdoor-nodejs-sdk-0.0.1.tgz","fileCount":3,"unpackedSize":16392,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFaUX+rHyJzAaVQtGZSvJ2vi0qWGZN/w/MEBHSJm849QIhAMoEucNqBz2oAZU/Z36D1a0nXtzTmvzypr/jn0idVHwE"}]},"_npmUser":{"name":"anxing131","email":"anxing131@gmail.com"},"directories":{},"maintainers":[{"name":"anxing131","email":"anxing131@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/casdoor-nodejs-sdk_0.0.1_1633512868781_0.48498546811129617"},"_hasShrinkwrap":false},"0.0.2":{"name":"@anxing131/casdoor-nodejs-sdk","version":"0.0.2","description":"nodejs client SDK for Casdoor","main":"lib/cjs/index.js","typings":"lib/cjs/index.d.ts","module":"lib/esm/index.js","license":"Apache-2.0","scripts":{"prepare":"husky install","test":"jest","build":"run-s clean && run-p build:*","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.esm.json","clean":"rimraf lib","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix"},"devDependencies":{"@types/jest":"^27.0.2","@types/jsonwebtoken":"^8.5.5","@typescript-eslint/eslint-plugin":"^4.31.2","@typescript-eslint/parser":"^4.31.2","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","husky":"^7.0.2","jest":"^27.2.1","npm-run-all":"^4.1.5","prettier":"^2.4.1","rimraf":"^3.0.2","ts-jest":"^27.0.5","typescript":"^4.4.3"},"keywords":["auth","authn","authentication","sso","oauth","oidc","casbin","casdoor"],"repository":{"type":"git","url":"git+https://github.com/casdoor/casdoor-nodejs-sdk.git"},"author":{"name":"anxing","email":"anxing131@gmail.com"},"bugs":{"url":"https://github.com/casdoor/casdoor-nodejs-sdk/issues"},"homepage":"https://github.com/casdoor/casdoor-nodejs-sdk","jest":{"maxConcurrency":1,"maxWorkers":1,"testTimeout":30000,"testEnvironment":"node","transform":{"^.+\\.(t|j)sx?$":"ts-jest"},"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"dependencies":{"@types/openid-client":"^3.7.0","jsonwebtoken":"^8.5.1","openid-client":"github:zhongjixiuxing/node-openid-client#main"},"gitHead":"74fa7d6efeb1883b724ee4cc260cf7772b01c048","_id":"@anxing131/casdoor-nodejs-sdk@0.0.2","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-ZYSK4BSRoGuc096UmkUYEWQjtuDk8Ataqw64eKlnjwq2Z0aywIip2zPr2hR3YPm0MbGB03dRiI8KALOEMjmSYQ==","shasum":"0bfeec9e160da436845f2bfdbae2317106b531b0","tarball":"https://registry.npmjs.org/@anxing131/casdoor-nodejs-sdk/-/casdoor-nodejs-sdk-0.0.2.tgz","fileCount":11,"unpackedSize":25085,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4YcxU17QL4OUbRbWnUckfxURktzs7EaczBer1g4FtcAIgHgapVwsBxiuz+FWdaXAMwJquwvLSw49Xk8/oELDrpL0="}]},"_npmUser":{"name":"anxing131","email":"anxing131@gmail.com"},"directories":{},"maintainers":[{"name":"anxing131","email":"anxing131@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/casdoor-nodejs-sdk_0.0.2_1633513495577_0.11867806496075328"},"_hasShrinkwrap":false},"0.0.3":{"name":"@anxing131/casdoor-nodejs-sdk","version":"0.0.3","description":"nodejs client SDK for Casdoor","main":"lib/cjs/index.js","typings":"lib/cjs/index.d.ts","module":"lib/esm/index.js","license":"Apache-2.0","scripts":{"prepare":"husky install","test":"jest","build":"run-s clean && run-p build:*","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.esm.json","clean":"rimraf lib","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix"},"devDependencies":{"@types/jest":"^27.0.2","@types/jsonwebtoken":"^8.5.5","@typescript-eslint/eslint-plugin":"^4.31.2","@typescript-eslint/parser":"^4.31.2","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","husky":"^7.0.2","jest":"^27.2.1","npm-run-all":"^4.1.5","prettier":"^2.4.1","rimraf":"^3.0.2","ts-jest":"^27.0.5","typescript":"^4.4.3"},"keywords":["auth","authn","authentication","sso","oauth","oidc","casbin","casdoor"],"repository":{"type":"git","url":"git+https://github.com/casdoor/casdoor-nodejs-sdk.git"},"author":{"name":"anxing","email":"anxing131@gmail.com"},"bugs":{"url":"https://github.com/casdoor/casdoor-nodejs-sdk/issues"},"homepage":"https://github.com/casdoor/casdoor-nodejs-sdk","jest":{"maxConcurrency":1,"maxWorkers":1,"testTimeout":30000,"testEnvironment":"node","transform":{"^.+\\.(t|j)sx?$":"ts-jest"},"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"dependencies":{"@types/axios":"^0.14.0","@types/openid-client":"^3.7.0","axios":"^0.22.0","jsonwebtoken":"^8.5.1","openid-client":"github:zhongjixiuxing/node-openid-client#main"},"gitHead":"74fa7d6efeb1883b724ee4cc260cf7772b01c048","_id":"@anxing131/casdoor-nodejs-sdk@0.0.3","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-0GY2Bf05PRGxUHtgyGHR0Rt0WdNh+SlWajXltcS1ORE70TOqFWceQWp9Oo0DMgD8pp35RKYYUVNR8j+zX0MnAw==","shasum":"b58bedabf8af6a8b747e9c2c32d44b6fc46e912d","tarball":"https://registry.npmjs.org/@anxing131/casdoor-nodejs-sdk/-/casdoor-nodejs-sdk-0.0.3.tgz","fileCount":27,"unpackedSize":34181,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCg3vWuveLCX0+uZ2CX+3yYV87BReQhdeGrUJbAEnUzPQIhAOFxPAedhfkdvgdOl8Pd0uY662HHmlWT/wr3RM1e3vuv"}]},"_npmUser":{"name":"anxing131","email":"anxing131@gmail.com"},"directories":{},"maintainers":[{"name":"anxing131","email":"anxing131@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/casdoor-nodejs-sdk_0.0.3_1633618802458_0.019289249939992592"},"_hasShrinkwrap":false},"0.0.4":{"name":"@anxing131/casdoor-nodejs-sdk","version":"0.0.4","description":"nodejs client SDK for Casdoor","main":"lib/cjs/index.js","typings":"lib/cjs/index.d.ts","module":"lib/esm/index.js","license":"Apache-2.0","scripts":{"prepare":"husky install","test":"jest","build":"run-s clean && run-p build:*","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.esm.json","clean":"rimraf lib","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix"},"devDependencies":{"@types/jest":"^27.0.2","@types/jsonwebtoken":"^8.5.5","@typescript-eslint/eslint-plugin":"^4.31.2","@typescript-eslint/parser":"^4.31.2","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","husky":"^7.0.2","jest":"^27.2.1","npm-run-all":"^4.1.5","prettier":"^2.4.1","rimraf":"^3.0.2","ts-jest":"^27.0.5","typescript":"^4.4.3"},"keywords":["auth","authn","authentication","sso","oauth","oidc","casbin","casdoor"],"repository":{"type":"git","url":"git+https://github.com/casdoor/casdoor-nodejs-sdk.git"},"author":{"name":"anxing","email":"anxing131@gmail.com"},"bugs":{"url":"https://github.com/casdoor/casdoor-nodejs-sdk/issues"},"homepage":"https://github.com/casdoor/casdoor-nodejs-sdk","jest":{"maxConcurrency":1,"maxWorkers":1,"testTimeout":30000,"testEnvironment":"node","transform":{"^.+\\.(t|j)sx?$":"ts-jest"},"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"dependencies":{"@types/axios":"^0.14.0","@types/openid-client":"^3.7.0","axios":"^0.22.0","jsonwebtoken":"^8.5.1","openid-client":"github:zhongjixiuxing/node-openid-client#main"},"gitHead":"7af92676d4f9249af6c3bb274be2114a58b8d657","_id":"@anxing131/casdoor-nodejs-sdk@0.0.4","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-uG+zpadHFmrSt4BnmrPR0y7Pt1mYMT/8E9lFtzOVJNXDHGODFlz+ntmykRZrL5qsoTXZ+xQrmi6L3K0FnKhH6w==","shasum":"33eafeddb1d407901762624753a2149d7b8ec74e","tarball":"https://registry.npmjs.org/@anxing131/casdoor-nodejs-sdk/-/casdoor-nodejs-sdk-0.0.4.tgz","fileCount":15,"unpackedSize":28774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzFeHCRA9TVsSAnZWagAATRQQAIcdA5aFG8EjeJHsu1JG\nxqWW+LIEbJru0A2JnX/xG2D0NahHsKCTkogdGh6pmNSlP6aBOoCVyWfeaFqC\nX5HDy/IcPZyyCKs1CCy9W1tl0TXlEK1hDcrpbMX5Pdx9lVQ8LWczHp3uzapf\nwKZZFUSHd9jO8TkC/pofsRXqLxX8iVa9AfKvbRf7C7h8Hto+PGdiEBAvxNkw\nscED6JLM4V4hNPPSJc4/u1Mm9iyUXJYib/i7PeYMbhnm+ubc3EdRjI22vtoB\nFqzIcrShKsslX8gPLyUPjGR+pmHTbd+KCF94GZgOPZ4WFmSdpnePQGSR5xan\ncopdGRJrMwpUzuNHl9nLeDih5m+xVacal+oTYBacaJGA1m7ur/HKDbMPNoEp\nkK0Jnnwt2DR7DwAFo5ToVMxTk0ctrw4I6oXfXV2HuKUESPAwoYjc7ca7E58x\nxsDxzsGfN5rQYnsohCoqKNInuTkNYZbcDQUQosjqJNZoRIdkDZc99U7KPUet\n/Icl/mYCqWK709r3pRQLmCA8onb1A2NfxQlhCwpiRNKKVKlOWAJkyOX+lRwc\nAr0krxd1CAu2XnH+f/sWxBIaACP+9Zr1c0hIKxjxMymcf+Shgn/FXGLUXZgc\n/wAkT9j745o0lT71IWtckTTwoBsQAGJcLuH0PcIHLdLPVxSLE5t53nl0hkpj\n9Tht\r\n=a88K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3a/g7fHNThmxni6wThWNwlM2KbFtENY4ayZMMnMAKawIgJ16Et03a1+qeplAIw9K6ppxFI8IkoZ7UeCX8LBAHgFg="}]},"_npmUser":{"name":"anxing131","email":"anxing131@gmail.com"},"directories":{},"maintainers":[{"name":"anxing131","email":"anxing131@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/casdoor-nodejs-sdk_0.0.4_1633693186144_0.45578466370485593"},"_hasShrinkwrap":false},"0.0.5":{"name":"@anxing131/casdoor-nodejs-sdk","version":"0.0.5","description":"Node.js client SDK for Casdoor","main":"lib/cjs/src/index.js","typings":"lib/cjs/src/index.d.ts","module":"lib/esm/src/index.js","license":"Apache-2.0","scripts":{"prepare":"husky install","prepack":"run-s build","postpack":"run-s clean","test":"jest","build":"run-s clean && run-p build:*","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.esm.json","semantic-release":"semantic-release","clean":"rimraf lib","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"eslint \"{src,apps,libs,test}/**/*.ts\"","coverage":"jest --coverage"},"devDependencies":{"@semantic-release/changelog":"^5.0.1","@semantic-release/commit-analyzer":"^8.0.1","@semantic-release/git":"^9.0.0","@semantic-release/github":"^7.2.3","@semantic-release/npm":"^7.1.3","@semantic-release/release-notes-generator":"^9.0.3","@types/jest":"^27.0.2","@types/jsonwebtoken":"^8.5.5","@typescript-eslint/eslint-plugin":"^4.31.2","@typescript-eslint/parser":"^5.11.0","semantic-release":"^17.4.4","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","husky":"^7.0.2","jest":"^27.2.1","npm-run-all":"^4.1.5","prettier":"^2.4.1","rimraf":"^3.0.2","ts-jest":"^27.0.5","typescript":"^4.5.5"},"keywords":["auth","authn","authentication","sso","oauth","oidc","casbin","casdoor"],"repository":{"type":"git","url":"git+https://github.com/casdoor/casdoor-nodejs-sdk.git"},"author":{"name":"anxing","email":"anxing131@gmail.com"},"bugs":{"url":"https://github.com/casdoor/casdoor-nodejs-sdk/issues"},"homepage":"https://github.com/casdoor/casdoor-nodejs-sdk","jest":{"maxConcurrency":1,"maxWorkers":1,"testTimeout":30000,"testEnvironment":"node","transform":{"^.+\\.(t|j)sx?$":"ts-jest"},"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"dependencies":{"axios":"^0.22.0","jsonwebtoken":"^8.5.1","openid-client":"github:zhongjixiuxing/node-openid-client#main"},"gitHead":"ac55ec3bca9ea72cad65ecd1770baa4e5b443a56","_id":"@anxing131/casdoor-nodejs-sdk@0.0.5","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-FDa5T1NSDtqR2qP7v0HpB9KuJTkTeQ4YKvA5vFJjdeEtQ3M8eWgTT76JV6OHCydD/0jG02VCG4rKBBNlTO9pDw==","shasum":"a49fce0bea3cd36d9e1f50fdf4275b6ee6d44448","tarball":"https://registry.npmjs.org/@anxing131/casdoor-nodejs-sdk/-/casdoor-nodejs-sdk-0.0.5.tgz","fileCount":27,"unpackedSize":34936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEPjBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/IA//d1RetZnSL1c8iv9XnBBlYi6rtYz66KjI4HPPoEURowZZ1IdN\r\nx1tuYrp8BB4BxzlEESSGD/fWD5RjY4rO6+ZTVl2rwMrcuGpscExlGNyqG1qg\r\nM3u3RRlmfRSu0yt/gM+vvBvRKQqnX7pmRnaA325g+XgGHs08XzPe48B8FvV5\r\n78wtJtee1YLOcZY6rf8Y5t7hGpWZt7Qp+lUmrQgIXhkkDdNKCtcxFYpNrGdc\r\n77ozaA6kdkPuIPgKMFzGg40t3jTlpeLlav/dYtYqPLxziYolF+rSU85fIVXp\r\niTJ6+wUTXGbC//IbyeINhdoGU25wHTIrJdgq9L1/h5+4nW2Cy0p7utikpoYC\r\npC+LHKmnTlg8iLhmm+kuMvplr1Z6MXBXH0a/M2RQHzmSfcWpSk5I3ui7Ijeg\r\nc59nfqDqrSaHXIJ3Flt58xCpHq1AcSNzLiA/HKHuMlz2sE/MzxVXzTumtLyU\r\nSyxSMx7pQKrR0c02xqEkJJ3f8+h0sQdvnchK2jB8BgeUf2mmiRs3cmopO0t4\r\nusAvxfb/wS3fYEs6sK5Cn5jnQKVCJnq5b+St0A0ZbvayYg0nd0RmumrWGpxW\r\nvmZrOF3TcQBZZxbVY2Q4iTpNEyZLQ6s1bXhMT56dfgwVk6bVIWtqJT2Xtvs8\r\nI9i9ziMIdkVvpiOUYb4VeGnSEr+hy4ofm58=\r\n=6vLi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVJWDpP9XubT0aoi4nlLDvIi4CPPXbFywYW7S9pc+hgQIhAKGvqnp8VlrYzzAc6aOqpof4sxYsFgEyl4XyO7NAP0sQ"}]},"_npmUser":{"name":"anxing131","email":"anxing131@gmail.com"},"directories":{},"maintainers":[{"name":"anxing131","email":"anxing131@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/casdoor-nodejs-sdk_0.0.5_1645279425246_0.9432753856841753"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-06T09:34:28.721Z","0.0.1":"2021-10-06T09:34:28.916Z","modified":"2022-04-04T14:26:14.466Z","0.0.2":"2021-10-06T09:44:55.753Z","0.0.3":"2021-10-07T15:00:02.825Z","0.0.4":"2021-10-08T11:39:46.316Z","0.0.5":"2022-02-19T14:03:45.430Z"},"maintainers":[{"name":"anxing131","email":"anxing131@gmail.com"}],"description":"Node.js client SDK for Casdoor","homepage":"https://github.com/casdoor/casdoor-nodejs-sdk","keywords":["auth","authn","authentication","sso","oauth","oidc","casbin","casdoor"],"repository":{"type":"git","url":"git+https://github.com/casdoor/casdoor-nodejs-sdk.git"},"author":{"name":"anxing","email":"anxing131@gmail.com"},"bugs":{"url":"https://github.com/casdoor/casdoor-nodejs-sdk/issues"},"license":"Apache-2.0","readme":"# casdoor-nodejs-sdk\n\n[![NPM version][npm-image]][npm-url]\n[![NPM download][download-image]][download-url]\n[![codebeat badge](https://codebeat.co/badges/4f1d141f-047a-43fe-a5d0-889fa4aaf726)](https://codebeat.co/projects/github-com-casdoor-casdoor-nodejs-sdk-master)\n[![GitHub Actions](https://github.com/casdoor/casdoor-nodejs-sdk/workflows/main/badge.svg)](https://github.com/casdoor/casdoor-nodejs-sdk/actions)\n[![Coverage Status](https://coveralls.io/repos/github/casdoor/casdoor-nodejs-sdk/badge.svg?branch=master)](https://coveralls.io/github/casdoor/casdoor-nodejs-sdk?branch=master)\n[![Release](https://img.shields.io/github/release/casdoor/casdoor-nodejs-sdk.svg)](https://github.com/casdoor/casdoor-nodejs-sdk/releases/latest)\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/casbin/casdoor)\n\n[npm-image]: https://img.shields.io/npm/v/casdoor-nodejs-sdk.svg?style=flat-square\n[npm-url]: https://npmjs.com/package/casdoor-nodejs-sdk\n[download-image]: https://img.shields.io/npm/dm/casdoor-nodejs-sdk.svg?style=flat-square\n[download-url]: https://npmjs.com/package/casdoor-nodejs-sdk\n\nThis is Casdoor's SDK for NodeJS will allow you to easily connect your application to the Casdoor authentication system without having to implement it from scratch.\n\nCasdoor SDK is very simple to use. We will show you the steps below.\n\n> Noted that this sdk has been applied to casnode, if you still don’t know how to use it after reading README.md, you can refer to it\n\n## Installation\n\n```shell script\n# NPM\nnpm i casdoor-nodejs-sdk\n\n# Yarn\nyarn add casdoor-nodejs-sdk\n```\n\n## Step1. Init SDK\n\nInitialization requires 5 parameters, which are all string type:\n\n| Name (in order)  | Must | Description                                         |\n| ---------------- | ---- | --------------------------------------------------- |\n| issuer           | Yes  | casdoor OIDC Issuer endpoint |\n| clientId         | Yes  | your Casdoor OAuth Client ID                        |\n| clientSecret     | Yes  | your Casdoor OAuth Client Secret                    |\n| casdoorEndpoint  | No  | your Casdoor API endpoint                   |\n\n\n```typescript\nimport { SDK, AuthConfig } from 'casdoor-nodejs-sdk'\n\nconst authCfg: AuthConfig = {\n  issuer: 'https://b4464f21-7cef-48f1-9591-4acbe1a4590e.mock.pstmn.io/.well-known/openid-configuration',\n  clientId: '673c704036c6bcd04aaa',\n  clientSecret: '2ba9708658b3036206b9b96ee8872242d3f9e956',\n  casdoorEndpoint: 'http://casdoor.anxing.io'\n}\n\nconst sdk = new SDK(authCfg)\n\n// call sdk to handle\n```\n\n## Step2. Get token and parse\n\nAfter casdoor verification passed, it will be redirected to your application with code and state, like `http://forum.casbin.org?code=xxx&state=yyyy`.\n\nYour web application can get the `code`,`state` and call `getOAuthToken(code, state)`, then parse out jwt token.\n\nThe general process is as follows:\n\n```typescript\nimport { SDK, AuthConfig } from 'casdoor-nodejs-sdk'\n\nconst authCfg: AuthConfig = {\n  issuer: 'https://b4464f21-7cef-48f1-9591-4acbe1a4590e.mock.pstmn.io/.well-known/openid-configuration',\n  clientId: '673c704036c6bcd04aaa',\n  clientSecret: '2ba9708658b3036206b9b96ee8872242d3f9e956',\n  casdoorEndpoint: 'http://casdoor.anxing.io'\n}\n\nconst sdk = new SDK(authCfg)\n\nconst tokenSet = await sdk.callback({\n  code: 'your authorization code',\n  state: 'your casdoor application name'\n})\nconst parseToken = sdk.parseJwtToken(tokenSet.access_token || '')\n```\n\n## Test\n\ntest env parameters\n\n| Name (in order)         | Must | Description                                         |\n| ----------------------- | ---- | --------------------------------------------------- |\n| TEST_CASDOOR_ISSUER     | Yes  | Casdoor OIDC Issuer endpoint                        |\n| TEST_CASDOOR_CLIENT_ID           | Yes  | your Casdoor OAuth Client ID               |\n| TEST_CASDOOR_CLIENT_SECRET       | Yes  | your Casdoor OAuth Client Secret           |\n| TEST_AUTHORIZATION_CODE          | No   | Test Authorization code                         |\n| TEST_APP                         | No   | Application.app, like: \"built-in\"          |\n| TEST_TEST_ORGANIZATION           | No   | Application.organization, like: \"built-in\"          |\n\n```bash\n\tyarn run test\n```\n","readmeFilename":"README.md"}