{"_id":"@advanced-rest-client/api-authorization","_rev":"12-5c4db9792fa1d368679bf8145114c600","name":"@advanced-rest-client/api-authorization","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.3":{"name":"@advanced-rest-client/api-authorization","version":"0.0.3","keywords":["web-components","authorization-forms","http","oauth1","oauth2","basic","ntlm","api-key","pass-through","RAML","OAS","swagger","amf","aml"],"license":"Apache-2.0","_id":"@advanced-rest-client/api-authorization@0.0.3","maintainers":[{"name":"jarrodek","email":"jarrodek@gmail.com"}],"contributors":[{"name":"The Advanced REST client authors","email":"arc@mulesoft.com"}],"homepage":"https://github.com/advanced-rest-client/api-authorization#readme","bugs":{"url":"https://github.com/advanced-rest-client/api-authorization/issues","email":"arc@mulesoft.com"},"dist":{"shasum":"4f35d2e8dad4d503ea6fe1dfc1b770b96aff5121","tarball":"https://registry.npmjs.org/@advanced-rest-client/api-authorization/-/api-authorization-0.0.3.tgz","fileCount":11,"integrity":"sha512-Q/YZfA/uUpMLifG/df01fwVDV9qT0h48u/Ta6eR/WTI0jFBLWk93nJYIXmYT+EHRNpL6MmxX5HXLPM9gp34d7Q==","signatures":[{"sig":"MEYCIQCZxnj1NvwDhxhBlVXMmHr6MHm/f7rXcvr7oqrYZHkppAIhANP/gFrsQmFjgGbJ0ydGUP8pSz8c9CblF6jldA8rRX3t","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70256,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWv98CRA9TVsSAnZWagAATLkP/AzGtL6wZszdcpUmlieM\nfFNe5DSimEwWqbNKxs3ZMudNpg9jd1d6SeAbnIjMvvtEoeY5TMCBzr77GgBG\nN23wct4BHhuMxfoU6/bXjjtUzGLeDr+7x2lJJGRIl6LRc+sLf9lGoA6v01gA\nrMxEOhtyTmIIxXl2wKRR5MgWhC1FeK+Yi8eS4cYwJyxPPO+TspHoCl8CuDAq\niL/bPWzbMJXhND11R5WL8u2hEEHr77uRNJ3e3AZenxSsrk9Epn/t5aDGgsAi\nK4ijBzUZXtnpNKgLHd2qY9+teS8i7OectvYnTkkPFLhVYfQ2JIB1kuRGbGDv\nv3mBULXLPzy+IavteKS32aYUJ7VOVZL0hbP5+XVeE9rB4VwYRrz+Y3BACCij\n4sOaFrZXHWtMuLvYOUro2qIWGdfLEQtg0REgNTyrtB9PQxeyLSsJATdvQoRB\nQ3ZhqQ+MjOS/9X72u8EJ0N+CUYH8bo/HDSNIgbuGo8enqidhAe15Z9U3qG4G\n9rh3OBFA/+UjYR4a2XY4iRHrcs4OAE+b2PRrw9hMwSa2P7qdUmDu4S5vbxZG\noGSPUkBSW9fE+5hTr+J9FW/39nQulD/vwvnR9AvvsvqQ3vrDbs4QEUiqputW\npYwZ7/yAZO7zoWXocKQXFBkxIQZFaN2dgFkgjp1h+RmvjN1WJYInO/QbBeTy\nMnAk\r\n=WE73\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","authors":["Pawel Psztyc"],"gitHead":"54b62a93664694755eac02fbb0a0637e88cdbf67","scripts":{"lint":"npm run lint:eslint && npm run lint:prettier","test":"karma start --coverage","start":"es-dev-server --app-index demo/index.html --node-resolve --open --watch","format":"npm run format:eslint && npm run format:prettier","prepare":"node demo/model.js","test:bs":"karma start karma.bs.config.js --coverage","test:sl":"karma start karma.sl.config.js --coverage","storybook":"start-storybook --node-resolve --watch --open","test:watch":"karma start --auto-watch=true --single-run=false","lint:eslint":"eslint --ext .js,.html . --ignore-path .gitignore","format:eslint":"eslint --ext .js,.html . --fix --ignore-path .gitignore","lint:prettier":"prettier \"**/*.js\" --check --ignore-path .gitignore","format:prettier":"prettier \"**/*.js\" --write --ignore-path .gitignore","storybook:build":"build-storybook","test:prune-snapshots":"karma start --prune-snapshots","test:update-snapshots":"karma start --update-snapshots"},"_npmUser":{"name":"jarrodek","email":"jarrodek@gmail.com"},"repository":{"url":"git://github.com/advanced-rest-client/api-authorization.git","type":"git"},"_npmVersion":"6.12.0","description":"A custom element to render authorization editor rendering viuew based on AMF model.","directories":{},"lint-staged":{"*.js":["eslint --fix"]},"_nodeVersion":"12.13.0","dependencies":{"lit-html":"^1.1.2","lit-element":"^2.2.1","@api-components/amf-helper-mixin":"^4.0.19","@anypoint-web-components/anypoint-item":"^1.0.5","@advanced-rest-client/events-target-mixin":"^3.0.0","@anypoint-web-components/anypoint-listbox":"^1.0.4","@advanced-rest-client/api-authorization-method":"^0.1.5","@anypoint-web-components/anypoint-dropdown-menu":"^0.1.14"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^4.2.3","sinon":"^9.0.0","eslint":"^6.1.0","deepmerge":"^4.2.2","jsrsasign":"^8.0.12","typescript":"^3.8.2","cryptojslib":"^3.1.2","lint-staged":"^10.0.7","es-dev-server":"^1.40.1","@commitlint/cli":"^8.3.5","@open-wc/testing":"^2.0.0","web-animations-js":"^2.3.2","@open-wc/eslint-config":"^2.0.0","@open-wc/testing-karma":"^3.2.43","@open-wc/prettier-config":"^0.1.10","@open-wc/testing-karma-bs":"^1.3.43","@open-wc/demoing-storybook":"^1.10.5","@polymer/iron-test-helpers":"^3.0.1","typescript-lit-html-plugin":"^0.9.0","@api-components/api-navigation":"^4.0.4","@commitlint/config-conventional":"^8.3.4","@advanced-rest-client/eslint-config":"^1.1.4","@api-components/api-model-generator":"^0.2.6","@advanced-rest-client/arc-demo-helper":"^1.0.17","@advanced-rest-client/prettier-config":"^0.1.0","@advanced-rest-client/testing-karma-sl":"^1.2.0","@advanced-rest-client/oauth-authorization":"^3.0.1","@anypoint-web-components/anypoint-checkbox":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/api-authorization_0.0.3_1583021947677_0.33391102309982323","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@advanced-rest-client/api-authorization","version":"0.1.0","keywords":["web-components","authorization-forms","http","oauth1","oauth2","basic","ntlm","api-key","pass-through","RAML","OAS","swagger","amf","aml"],"license":"Apache-2.0","_id":"@advanced-rest-client/api-authorization@0.1.0","maintainers":[{"name":"jarrodek","email":"jarrodek@gmail.com"}],"contributors":[{"name":"The Advanced REST client authors","email":"arc@mulesoft.com"}],"homepage":"https://github.com/advanced-rest-client/api-authorization#readme","bugs":{"url":"https://github.com/advanced-rest-client/api-authorization/issues","email":"arc@mulesoft.com"},"dist":{"shasum":"bd148b31ada1919cbc3d228a1bab47a23bc383a3","tarball":"https://registry.npmjs.org/@advanced-rest-client/api-authorization/-/api-authorization-0.1.0.tgz","fileCount":12,"integrity":"sha512-X0ScqlX+GovFfBEg1Ew09FRY5WDN3IsG9tj/1wOpW9J8xxKxGnND2YPZiXM2LoPS76Qzsn5Wm/9PiFd+PWvG4Q==","signatures":[{"sig":"MEUCIQC5w71Io3X/NxvOyW6jKlg72eercCQuHjBOLCh3kMWgaAIgfL6bCi4K6oiBzV03bRRbaGntlkZFbXLhEfM+ZcL4fWU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWwCqCRA9TVsSAnZWagAALy4P/39DLAhCwTFegRIZXdcR\nOEjxlMSwXZHVhTvn0L1oQhDoBTY5RdAF1Bb53kQuyNrMqK/r6rsR/mm0ulIh\nsyvVkclT/39ZgKiDt/XPdptdZRwtKH8eX7uNx/sm9b8RowopdDyfKdO2w8mu\nyAP4H6CSZkOGJGqK5q6RP23IKqXA7Mo/60IiYy9239LRCnKc7r7+FFtaQd69\n/KTnb/Ug1v88KXC3G79vvSorWlnS4t3mwsNzDjbzyv1cwm+LVGGBf0BMb7EB\n1170G3eSUUAc1cX04HWQmmyRsAbrMi+t5Yq6P41KDDXAkxddAc5MuXZPVDXd\nfV7lXQya/Vt4kMMU9oSC/jsk2hGIOpvpJAZKQT86XuOpUgaFB5xgmJa9tpJo\nIE02hHiGdI55jDrRNTMRnzL8qeSa5dPyioM4aKIrl34D4vSLccRzGHm+MF7h\nCPbMRq3pkSurs/EBI5X7rxjoOj1TrpJta/vK9LzTWbZJPNjeHEfYjRzTasHd\nyaWWpGx3f+Ltcj4bIeakP6+NBMMKkR6/onVBlMJanifNOUsPq3szu+NkBwSW\nEOOYpV8tsMBQAue3ZRrxVVWquAhf6w1CcQhdMz/kx28//638y31KGu0YSpji\nhtbh5Cx0wNSnt2Tju0nmKgwpKLMrrw5XYQCDpvvtZt4C56p6UvXu2F2rK3vH\nJhhp\r\n=BIRy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","authors":["Pawel Psztyc"],"gitHead":"1a0b9e94ac1ccb60a067d4ec93b3eb575e961197","scripts":{"lint":"npm run lint:eslint && npm run lint:prettier","test":"karma start --coverage","start":"es-dev-server --app-index demo/index.html --node-resolve --open --watch","format":"npm run format:eslint && npm run format:prettier","prepare":"node demo/model.js","test:bs":"karma start karma.bs.config.js --coverage","test:sl":"karma start karma.sl.config.js --coverage","storybook":"start-storybook --node-resolve --watch --open","test:watch":"karma start --auto-watch=true --single-run=false","lint:eslint":"eslint --ext .js,.html . --ignore-path .gitignore","format:eslint":"eslint --ext .js,.html . --fix --ignore-path .gitignore","lint:prettier":"prettier \"**/*.js\" --check --ignore-path .gitignore","format:prettier":"prettier \"**/*.js\" --write --ignore-path .gitignore","storybook:build":"build-storybook","test:prune-snapshots":"karma start --prune-snapshots","test:update-snapshots":"karma start --update-snapshots"},"_npmUser":{"name":"jarrodek","email":"jarrodek@gmail.com"},"repository":{"url":"git://github.com/advanced-rest-client/api-authorization.git","type":"git"},"_npmVersion":"6.12.0","description":"A custom element to render authorization editor rendering viuew based on AMF model.","directories":{},"lint-staged":{"*.js":["eslint --fix"]},"_nodeVersion":"12.13.0","dependencies":{"lit-html":"^1.1.2","lit-element":"^2.2.1","@api-components/amf-helper-mixin":"^4.0.19","@anypoint-web-components/anypoint-item":"^1.0.5","@advanced-rest-client/events-target-mixin":"^3.0.0","@anypoint-web-components/anypoint-listbox":"^1.0.4","@advanced-rest-client/api-authorization-method":"^0.1.5","@anypoint-web-components/anypoint-dropdown-menu":"^0.1.14"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^4.2.3","sinon":"^9.0.0","eslint":"^6.1.0","deepmerge":"^4.2.2","jsrsasign":"^8.0.12","typescript":"^3.8.2","cryptojslib":"^3.1.2","lint-staged":"^10.0.7","es-dev-server":"^1.40.1","@commitlint/cli":"^8.3.5","@open-wc/testing":"^2.0.0","web-animations-js":"^2.3.2","@open-wc/eslint-config":"^2.0.0","@open-wc/testing-karma":"^3.2.43","@open-wc/prettier-config":"^0.1.10","@open-wc/testing-karma-bs":"^1.3.43","@open-wc/demoing-storybook":"^1.10.5","@polymer/iron-test-helpers":"^3.0.1","typescript-lit-html-plugin":"^0.9.0","@api-components/api-navigation":"^4.0.4","@commitlint/config-conventional":"^8.3.4","@advanced-rest-client/eslint-config":"^1.1.4","@api-components/api-model-generator":"^0.2.6","@advanced-rest-client/arc-demo-helper":"^1.0.17","@advanced-rest-client/prettier-config":"^0.1.0","@advanced-rest-client/testing-karma-sl":"^1.2.0","@advanced-rest-client/oauth-authorization":"^3.0.1","@anypoint-web-components/anypoint-checkbox":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/api-authorization_0.1.0_1583022249796_0.34981988212427617","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@advanced-rest-client/api-authorization","version":"0.1.1","keywords":["web-components","authorization-forms","http","oauth1","oauth2","basic","ntlm","api-key","pass-through","RAML","OAS","swagger","amf","aml"],"license":"Apache-2.0","_id":"@advanced-rest-client/api-authorization@0.1.1","maintainers":[{"name":"jarrodek","email":"jarrodek@gmail.com"}],"contributors":[{"name":"The Advanced REST client authors","email":"arc@mulesoft.com"}],"homepage":"https://github.com/advanced-rest-client/api-authorization#readme","bugs":{"url":"https://github.com/advanced-rest-client/api-authorization/issues","email":"arc@mulesoft.com"},"dist":{"shasum":"c370db17d306532bd6370acd568ebff09cc61157","tarball":"https://registry.npmjs.org/@advanced-rest-client/api-authorization/-/api-authorization-0.1.1.tgz","fileCount":12,"integrity":"sha512-eDUw5gTI2jTW/26w2i5wBSvEyEzmcIlov2B7DTVYLWJznYYZmJuabQofSHEOZKvuhIDZweZItLAHI+smrVGfkA==","signatures":[{"sig":"MEQCIEG0hPpKsNqzo9ZGSLOeBRDle6RkPaqjLcYS0s18et9GAiAenxjIeV43xxJyVZemViILj0G2zGlZ1LOOrQnxt0uVmg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeW+d7CRA9TVsSAnZWagAA0C4P/j+kbfzgKEvidZwJyH6d\nkdHGci+ysf6k+L9zKkg//I2uIg+RAwYNg/MCstdZFHuq0rJheBaga0eFfCdz\n2rGhnxRaE/xc/OmNrPHUKe1hiMP+8SYOZTmWVE5OXtP7nyD7z/kWdBjw9KkZ\n234cqlaPQczAkbKZOueqwT94ine/avnR53zASiYdNx+ygOWisMjLhWoxX23+\nExw1Of7nXd4vMSGjJ3cG9bWtMnb/VSDjKxbJ05kiKOy/sn2LCzWXRQ/Ge7oq\n2Fj/sit18poC/Zo2CfOoNTsDnPA2kslFnd6chYh1JXQgUPchaMVX+dAN3Mg7\nPFb8IHRMGb5CG6i2FjES/f7zS8GWN+wlD5VMLmv5idDpWGovhKC63p2UXfj6\nGQK3V+M1ylBxOkCxjjbZpxdhShTzI7EC49YCMkegMus0ZoveLFENOWCm+dyX\njaU89654vttju8T3pW4BtJg3/9qLvefasDVNEBdZLW1TW/MOjLmxT7VbavuN\nCI8mg23t+QwYCXc/kDtV7O7vHuE4n6bxzRmBijVewKqFINKQVTBc31beKYuG\nFQnhkGeA5hVxOkjO4unOrSR2s84V2z0RE7QcM7riKqoKKgv5KWkW2eVPUZ1p\ntI3io+a4Ba+3xt20qVlf0vGlhqbiWmr1mHymcF7P9QqWwoZfxXuXIWgaDl1u\nhxkP\r\n=hlaJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","authors":["Pawel Psztyc"],"gitHead":"f4e30d92695514efeccb046ad4540cb0b0aaf833","scripts":{"lint":"npm run lint:eslint && npm run lint:prettier","test":"karma start --coverage","start":"es-dev-server --app-index demo/index.html --node-resolve --open --watch","format":"npm run format:eslint && npm run format:prettier","prepare":"node demo/model.js","test:bs":"karma start karma.bs.config.js --coverage","test:sl":"karma start karma.sl.config.js --coverage","storybook":"start-storybook --node-resolve --watch --open","test:watch":"karma start --auto-watch=true --single-run=false","lint:eslint":"eslint --ext .js,.html . --ignore-path .gitignore","format:eslint":"eslint --ext .js,.html . --fix --ignore-path .gitignore","lint:prettier":"prettier \"**/*.js\" --check --ignore-path .gitignore","format:prettier":"prettier \"**/*.js\" --write --ignore-path .gitignore","storybook:build":"build-storybook","test:prune-snapshots":"karma start --prune-snapshots","test:update-snapshots":"karma start --update-snapshots"},"_npmUser":{"name":"jarrodek","email":"jarrodek@gmail.com"},"repository":{"url":"git://github.com/advanced-rest-client/api-authorization.git","type":"git"},"_npmVersion":"6.12.0","description":"A custom element to render authorization editor rendering viuew based on AMF model.","directories":{},"lint-staged":{"*.js":["eslint --fix"]},"_nodeVersion":"12.13.0","dependencies":{"lit-html":"^1.1.2","lit-element":"^2.2.1","@api-components/amf-helper-mixin":"^4.0.19","@anypoint-web-components/anypoint-item":"^1.0.5","@advanced-rest-client/events-target-mixin":"^3.0.0","@anypoint-web-components/anypoint-listbox":"^1.0.4","@advanced-rest-client/api-authorization-method":"^0.1.5","@anypoint-web-components/anypoint-dropdown-menu":"^0.1.14"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^4.2.3","sinon":"^9.0.0","eslint":"^6.1.0","deepmerge":"^4.2.2","jsrsasign":"^8.0.12","typescript":"^3.8.2","cryptojslib":"^3.1.2","lint-staged":"^10.0.7","es-dev-server":"^1.40.1","@commitlint/cli":"^8.3.5","@open-wc/testing":"^2.0.0","web-animations-js":"^2.3.2","@open-wc/eslint-config":"^2.0.0","@open-wc/testing-karma":"^3.2.43","@open-wc/prettier-config":"^0.1.10","@open-wc/testing-karma-bs":"^1.3.43","@open-wc/demoing-storybook":"^1.10.5","@polymer/iron-test-helpers":"^3.0.1","typescript-lit-html-plugin":"^0.9.0","@api-components/api-navigation":"^4.0.4","@commitlint/config-conventional":"^8.3.4","@advanced-rest-client/eslint-config":"^1.1.4","@api-components/api-model-generator":"^0.2.6","@advanced-rest-client/arc-demo-helper":"^1.0.17","@advanced-rest-client/prettier-config":"^0.1.0","@advanced-rest-client/testing-karma-sl":"^1.2.0","@advanced-rest-client/oauth-authorization":"^3.0.1","@anypoint-web-components/anypoint-checkbox":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/api-authorization_0.1.1_1583081339181_0.07115935165126874","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@advanced-rest-client/api-authorization","version":"0.1.2","keywords":["web-components","authorization-forms","http","oauth1","oauth2","basic","ntlm","api-key","pass-through","RAML","OAS","swagger","amf","aml"],"license":"Apache-2.0","_id":"@advanced-rest-client/api-authorization@0.1.2","maintainers":[{"name":"jarrodek","email":"jarrodek@gmail.com"}],"contributors":[{"name":"The Advanced REST client authors","email":"arc@mulesoft.com"}],"homepage":"https://github.com/advanced-rest-client/api-authorization#readme","bugs":{"url":"https://github.com/advanced-rest-client/api-authorization/issues","email":"arc@mulesoft.com"},"dist":{"shasum":"fef471dd165b31e15824209bf7cc48016e9c5311","tarball":"https://registry.npmjs.org/@advanced-rest-client/api-authorization/-/api-authorization-0.1.2.tgz","fileCount":12,"integrity":"sha512-QSfNPTxKaH9fD6wc3wTURq1FzqdLb88AvGxAVNJYKPz/uqXmsBky+CnvNa21Aoc65j1PR4OSAl3sg70SPSPeLQ==","signatures":[{"sig":"MEUCIGbKr9KFZbR6M6ixOSH18leHmJDW+25oWPcUX/nnfJehAiEA2ucMNWFJ7x2XlN6sETcQ8FY7+45/vok2DPzDWuNVh/0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":78058,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXocrCRA9TVsSAnZWagAAsWsQAJNBHNXtuVFgKRTMZPsJ\nhnt4X6W2R4kbbNOEMJYTZBBYFftd1lg8Nc9R/Rbg+5Zit9UmkBIrmI96iikh\nnvtz29Ohycsbal5LcUflONtBDNvqAlzf1Q3QSwHcgu0hcbbc/wgeMqOc2EnW\nWx0YQkZ/jPQZjSHO+sPEXXcHYk5gmy89xrqqQm3y50DDMzJIEWGZx27IlvmX\nnlS/Xe1QdgTAxYVRvEEuEqLRsVARbuKo7eyUto7qWHBAX2Cp57eOqMcOq8io\nFht4G9/xer3dnI4T7wGCBixtUhelSZan803mqubGR2ftxu+N9W2pw3Lys1my\nfKKz75Ce+o3ICaErsHtrF8JpMBJeMuHa7OeSB1CJMlqc8wubnYXq5+4c4zbD\nuVZJsm19vprPOgQd60ewj+CeB1Ozwpujoof4bbgnFFsyPeDUTH9Szb1IgHy6\nbil3hnQBOK5CPX1NwgACiK2OFm/Vvh7oDg7pS9WKsWGwnE9uqn9prbQPZ+NZ\n9DtCnOIzJ6Ez6pN5MlkythwU+9GhcW032o3739SRXqacoP4g3yw9k6bmg9qH\nt8hu1sJZjj5zgw+/tZHE8prF+O2YtS2nhWWyCeqPwp/67pRXDFBGW19wU9cO\nsfcg1oWw6WxBw50D6ZhX/0j7kDRhL1Eloc7j5bFV9WJR+kEKuZHIfH9rOgL1\nUv7v\r\n=Doq1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","authors":["Pawel Psztyc"],"gitHead":"f91a9a7f7863cf0bead0410cb617dad1db5fc8be","scripts":{"lint":"npm run lint:eslint && npm run lint:prettier","test":"karma start --coverage","start":"es-dev-server --app-index demo/index.html --node-resolve --open --watch","format":"npm run format:eslint && npm run format:prettier","prepare":"node demo/model.js","test:bs":"karma start karma.bs.config.js --coverage","test:sl":"karma start karma.sl.config.js --coverage","storybook":"start-storybook --node-resolve --watch --open","test:watch":"karma start --auto-watch=true --single-run=false","lint:eslint":"eslint --ext .js,.html . --ignore-path .gitignore","format:eslint":"eslint --ext .js,.html . --fix --ignore-path .gitignore","lint:prettier":"prettier \"**/*.js\" --check --ignore-path .gitignore","format:prettier":"prettier \"**/*.js\" --write --ignore-path .gitignore","storybook:build":"build-storybook","test:prune-snapshots":"karma start --prune-snapshots","test:update-snapshots":"karma start --update-snapshots"},"_npmUser":{"name":"jarrodek","email":"jarrodek@gmail.com"},"repository":{"url":"git://github.com/advanced-rest-client/api-authorization.git","type":"git"},"_npmVersion":"6.12.0","description":"A custom element to render authorization editor rendering viuew based on AMF model.","directories":{},"lint-staged":{"*.js":["eslint --fix"]},"_nodeVersion":"12.13.0","dependencies":{"lit-html":"^1.1.2","lit-element":"^2.2.1","@api-components/amf-helper-mixin":"^4.0.19","@anypoint-web-components/anypoint-item":"^1.0.5","@advanced-rest-client/events-target-mixin":"^3.0.0","@anypoint-web-components/anypoint-listbox":"^1.0.4","@advanced-rest-client/api-authorization-method":"^0.1.5","@anypoint-web-components/anypoint-dropdown-menu":"^0.1.14"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^4.2.3","sinon":"^9.0.0","eslint":"^6.1.0","deepmerge":"^4.2.2","jsrsasign":"^8.0.12","typescript":"^3.8.2","cryptojslib":"^3.1.2","lint-staged":"^10.0.7","es-dev-server":"^1.40.1","@commitlint/cli":"^8.3.5","@open-wc/testing":"^2.0.0","web-animations-js":"^2.3.2","@open-wc/eslint-config":"^2.0.0","@open-wc/testing-karma":"^3.2.43","@open-wc/prettier-config":"^0.1.10","@open-wc/testing-karma-bs":"^1.3.43","@open-wc/demoing-storybook":"^1.10.5","@polymer/iron-test-helpers":"^3.0.1","typescript-lit-html-plugin":"^0.9.0","@api-components/api-navigation":"^4.0.4","@commitlint/config-conventional":"^8.3.4","@advanced-rest-client/eslint-config":"^1.1.4","@api-components/api-model-generator":"^0.2.6","@advanced-rest-client/arc-demo-helper":"^1.0.17","@advanced-rest-client/prettier-config":"^0.1.0","@advanced-rest-client/testing-karma-sl":"^1.2.0","@advanced-rest-client/oauth-authorization":"^3.0.1","@anypoint-web-components/anypoint-checkbox":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/api-authorization_0.1.2_1583253290669_0.6179296236946814","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-03-01T00:19:07.525Z","modified":"2026-04-07T19:30:00.018Z","0.0.3":"2020-03-01T00:19:07.829Z","0.1.0":"2020-03-01T00:24:10.029Z","0.1.1":"2020-03-01T16:48:59.601Z","0.1.2":"2020-03-03T16:34:50.776Z"},"bugs":{"url":"https://github.com/advanced-rest-client/api-authorization/issues","email":"arc@mulesoft.com"},"license":"Apache-2.0","homepage":"https://github.com/advanced-rest-client/api-authorization#readme","keywords":["web-components","authorization-forms","http","oauth1","oauth2","basic","ntlm","api-key","pass-through","RAML","OAS","swagger","amf","aml"],"repository":{"url":"git://github.com/advanced-rest-client/api-authorization.git","type":"git"},"description":"A custom element to render authorization editor rendering viuew based on AMF model.","contributors":[{"name":"The Advanced REST client authors","email":"arc@mulesoft.com"}],"maintainers":[{"email":"jarrodek@gmail.com","name":"jarrodek"},{"email":"alexperez@mulesoft.com","name":"alexperez_march_2024"},{"email":"elmellidiego@gmail.com","name":"dmacias"}],"readme":"# api-authorization\n\nA custom element that renders and manages authorization state in AMF powered application.\n\nAfter applying the AMF model and security scheme for an operation the element decides\nwhich method to render, list of possible methods, manages state when the user\nchange any of the values, and provides validation methods for the UI.\n\nIf authorization method operates on headers or query parameters this component\ndispatches corresponding change event so other component can update the sate.\n\nMore complex authorization schemes like OAuth 1or OAuth 2 first require obtaining\naccess token. Once the token is obtained then validation state is updated and corresponding\ndelivery method is used (header or query parameter).\n\nThis element support security description for both RAML and OAS.\n\n-   OAuth 2\n-   OAuth 2 with annotation (see [RAML's docs](https://github.com/raml-org/raml-annotations/tree/master/annotations/security-schemes))\n-   OAuth 1\n-   RAML custom scheme\n-   Pass Through\n-   Api Key (OAS)\n-   Bearer (OAS)\n\nNote, Digest authorization method is not supported at the time. If you are interested in this method, please, let us know.\n\n## Usage\n\n### Installation\n\n```bash\nnpm install --save @advanced-rest-client/api-authorization\n```\n\n### In an html file\n\n```html\n<html>\n  <head>\n    <script type=\"module\">\n      import '@advanced-rest-client/api-authorization/api-authorization.js';\n    </script>\n  </head>\n  <body>\n    <api-authorization-method redirecturi=\"...\"></api-authorization-method>\n    <script>\n    (async () => {\n      const model = await getAmfModel();\n      const security = getSecurity(model, '/endpoint', 'get');\n      const element = document.querySelector('api-authorization');\n      element.amf = model;\n      element.security = security;\n      element.onchange = (e) => {\n        if (e.target.validate()) {\n          const authList = e.target.serialize();\n          console.log(authList);\n        }\n      };\n    })();\n    </script>\n  </body>\n</html>\n```\n\n### In a LitElement\n\n```js\nimport { LitElement, html } from 'lit-element';\nimport '@advanced-rest-client/api-authorization/api-authorization.js';\n\nclass SampleElement extends LitElement {\n  static get properties() {\n    return {\n      amfModel: { type: Array },\n      endpoint: { type: String },\n      method: { type: String },\n    };\n  }\n\n  get security() {\n    const { amfModel, endpoint, method } = this;\n    return this.readSecurityFor(amfModel, endpoint, method);\n  }\n\n  readSecurityFor(amf, endpoint, method) {\n    // implement me\n  }\n\n  _authChanged(e) {\n    if (e.target.validate()) {\n      const authList = e.target.serialize();\n      console.log(authList);\n    }\n  }\n\n  render() {\n    const { amfModel, security } = this;\n    return html`\n    <api-authorization\n      .amf=\"${amfModel}\"\n      .security=\"${security}\"\n      @change={this._authChanged}\n    ></api-authorization-method>`;\n  }\n}\ncustomElements.define('sample-element', SampleElement);\n```\n\n### Applying AMF model\n\nFirst step is to pass the generated AMF model to the `amf` property. It is required to properly resolve internal model dependencies and to read keys in [JSON+LD compact model](https://w3c.github.io/json-ld-syntax/#compact-iris).\n\nSecond step is to extract the correct security definition for an operation. It is added to a `http://a.ml/vocabularies/apiContract#supportedOperation` object. It should be an array of all supported by the operation methods.\n\nAn example script that applies the values can look like the following.\n\n```html\n<api-authorization-method type=\"OAuth 2\" id=\"auth\"></api-authorization-method>\n<script>\n(async () => {\n  const model = await getAmfModelSomehow();\n  const security = readSecurityFor(model, '/endpoint', 'GET');\n  const method = document.getElementById('auth');\n  method.amf = model;\n  method.security = security;\n})();\n</script>\n```\n\nThe `getAmfModelSomehow()` function can download pre-generated model or run AMF parser directly from RAML or OAS specification.\nThen the `readSecurityFor()` function looks for security definition in `/endpoint` endpoint, inside `GET` method.\nWhen ready the values are applied to the element.\n\nThe order of setting `amf` and `security` parameters doesn't matter as the data processing starts asynchronously.\n\nA note on clearing `settings` property. When an `undefined` or any incompatible value is set to the `settings` property, the component renders nothing and sets `aria-hidden` attribute.\n\n### Authorization settings\n\nAn API may define more than one authorization method to be applied to a request. This is possible with OAS defined APIs, RAML has no such concept. Because of that the `settings` getter (or `serialize()` function) returns an array of applied authorization settings.\n\nEach object has `type` and `valid` properties. The `type` is one of the supported by the `@advanced-rest-client/api-authorization-method` values for `type` attribute. The `valid` property is a result of validating the element that provides the UI for the authorization method.\nAdditionally each object contains `settings` property that contains user entered values and configuration read from the API. The properties for this object depends on selected authorization method and it is a result of calling `serialize()` function on `api-authorization-method`.\n\n### Applying authorization settings\n\nThe component does not propagate changes to the headers or query parameters.\nThis should be done before the request is being executed. For that call `createAuthParams()` method to generate a list of parameters to apply to the request object.\n\n```javascript\nsendRequest() {\n  const authCmp = this.shadowRoot.querySelector('api-authorization');\n  const auth = authCmp.createAuthParams();\n  const request = {\n    method: 'GET',\n    url: 'https://api.domain.com/path?',\n    headers: '',\n  };\n  Object.keys(auth.headers).forEach((header) => request.headers += `${header}: ${auth.headers[header]}\\n`);\n  Object.keys(auth.params).forEach((param) => request.url += `${param}=${auth.params[param]}&`);\n}\n```\n\n### Additional steps\n\n#### Digest, NTLM\n\nDigest and NTLM authorization methods interacts with the request in a way that makes it impossible to apply the settings to the request before initializing the connection. It requires a series of requests and responses managed on the same connection. Because of that for this two methods the component produces authorization settings only. The hosting application must always check for current authorization settings and if either method is used then perform the authorization when connection is made.\n\n#### OAuth 1\n\nOAuth 1 authorization is based on signing the request data: HTTP method and the URL. This may change after the authorization is set up.\nBecause of that the application that host this element must sign the request with the authorization header as described in [this document](https://oauth1.wp-api.org/docs/basics/Signing.html). Use `settings` getter to get current settings.\n\nThe `@advanced-rest-client/oauth-authorization` component has `signRequest(request, auth)` method to sign a request for OAuth 1 protocol.\n\nExample\n\n```javascript\nconst settings = node.serialize();\nconst oauth1 = settings.find((item) => item.type === 'oauth 1');\nif (oauth1 && oauth1.valid) {\n  const oauth1auth = document.querySelector('oauth1-authorization');\n  oauth1auth.signRequest(request, oauth1.settings);\n}\n```\n\n## Development\n\n```sh\ngit clone https://github.com/advanced-rest-client/api-authorization\ncd api-authorization\nnpm install\n```\n\n### Running the demo locally\n\n```sh\nnpm start\n```\n\n### Running the tests\n```sh\nnpm test\n```\n","readmeFilename":"README.md"}