{"_id":"@flexbase/http-client-middleware","_rev":"41-3379daa11dca221124bdec06009115f8","name":"@flexbase/http-client-middleware","dist-tags":{"beta":"2.0.3-beta.12","latest":"2.0.13"},"versions":{"0.1.40":{"name":"@flexbase/http-client-middleware","version":"0.1.40","author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@0.1.40","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"c01782514814bc77492eb62ea41283e488c31234","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-0.1.40.tgz","fileCount":45,"integrity":"sha512-3KBPqKUZak0TjO+yv+xcaWKPSRNkZ5Ja7Cwo7HHJ1/h/lxrBYxK1D7Ow7Ze8TqEJCPOa1rJICAw+ge5cDmUBNg==","signatures":[{"sig":"MEUCIGhdYwhD/+nT+jIXMWZk2GgfoK75K3fxPFhTvY6Ip+LaAiEAlU4Pcx9N0opdhL7OpMVHby7ZnlIU4O2ZRG+890sVJdY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJirzhfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZgg/9EnnmMnaThcYk4yqLZTld7G8jDBlmvVRCXev9iu5TxU84Uz0K\r\noRLOSACzIIv1q7onK/epqgYBmG/xn076g966JROR7ojdH5JI0NTGwHcN4B0l\r\nQ1Le30H89sj1tt+TTKuyALjzEXX+xgJwxuW66vt7Yn+OJBsoEfUcHXCXgQUd\r\nVXKUwQdxER4kBfEaEVPZ59UPKHr9VVThBQ4ynA5HCmg8MUDEUzo+s9ZZ+3Bt\r\njIrnznox6/HKXaMY9jmFMSUiQQ/Pn70Wf/30Z+64daa2UrvdNiSVrQdnmlL3\r\nVwW9bwSkGqdTZKuv3tG5bifVrvM7VwG4sWfeapmlmzKPQQXNbgsbr+yxb/QB\r\nYcUpTb0KDOH+BFapw8Hb8703sd841LNIDDX3v8Ng4cXfSuk2q8EFMW6FPBU4\r\nAKTVDeEN4onX32m37hguQXkzIzpbcnyRo29nZt/5NUQXMxEZwzmBCbDohllX\r\n4I3nkwdR6PTKP18ETok73V9DowkM0e2+ZOmNHvTNIMhemQWPTs9xj6SPXmvY\r\n7NdhtrTYFeiMVetfu/ipPA+c5C/2W78ZG6IKvRPLHzKhjujDd6pOM5E52pwD\r\nm0vM11p3nm7MKauOh9eCCg3geG59R0ems0CQ6DwDxGW3ETct4GLvEiLi553v\r\nZfY3cW/wPmKxTNjOPRosO8onuOVVySwvfWY=\r\n=UchH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_0.1.40_1655650398943_0.6676211894450956","host":"s3://npm-registry-packages"}},"0.1.41":{"name":"@flexbase/http-client-middleware","version":"0.1.41","author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@0.1.41","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"3fd638dc87a76c3c71b7a93e4d2de36fc0d1f5f0","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-0.1.41.tgz","fileCount":46,"integrity":"sha512-gpnN9bqwyFL6377NKNemggGCgw2qV72/Hnry+G4H7jGF84fKQ1kodSYkDjzmdjlE9Iz8BeIGS4+96llhJRVnIQ==","signatures":[{"sig":"MEQCIE8S6vDOOK752jOc/OR81AxmrjtDKtaS7bt7tX1XGr/kAiAEKvWvRoLtRKCalo2Hc1zf5bUvlJHCLloGMskTb9vxbA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJirzrHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqOYA//Ydxuu5FSug+sqYhtbtL/o8jS2SkAdV/C66tLl8INxQpYIhKf\r\nVm0oVX3NXc92oMd0kZ4WXKlI2fe2S0wclNOnON76f1CD+F1AQmHFXXbImmfu\r\nnsz+esjLugKsKhUd1Zcxb6ugFAwvc6qSP/tcmQ8QDYykjCUKIzThFzNA/6Ud\r\ns20/DjwHAWlWiKEfLlJm8sVYCID3youRRDINPK+MkZ5ogC7DxU7FJcA6iaSG\r\nToui3KVCC0Lle7W9qJ0fO0uFXYuA8x+1RDrqXtPjPk7P7WEAQ41zdjZPMsct\r\nek8uyh2jDqTBonYOxCyOANQFsrgLZesPHXOodUSudhf7N/RjVTuYVgCrg2FX\r\n02b/5T6a4j93zzLpqq2FMh0bFR4WVl3iEWKSi2WOGKkqLMs4D0me7j/R5QKh\r\nN7XiEi7iuKM5XMXBegHCfDq4fG4rJ3S4KIEyaqdW5JWZ7fqTd0QKZaKE6J66\r\n4vyogCWt0fwXUluKgSn9IaAK+xbh+4J5m1Vvf2zfh+ba0zgbo1JCvtHMXsMu\r\nidQpIXzrOeY80lhkvP67mEAdNME0gTqMMQPGrkAC6mAsyTHKNKWULG6VrG+C\r\nUn1yv09ARDDa6WJdsxoMcY+RDzZQqCUB85pxRngQBI+H/VJcZtHooMcafHeZ\r\nXMaIK5uOO8lNG1kTxrD/JKxceRWpsMpewqA=\r\n=hUgx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_0.1.41_1655651015028_0.8649125343947075","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@flexbase/http-client-middleware","version":"0.1.0","author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@0.1.0","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"d878682f43345828767a8f0f1e2968cf12d6b1ca","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-0.1.0.tgz","fileCount":46,"integrity":"sha512-DJ8Ljn9thvPY3Rh/ySznnclJ+iNfjtuhXSR1HDfH2C0vQ29odt75ylFZpTGAv6+mG8S5bpZr+osXcFn0W4ck/A==","signatures":[{"sig":"MEUCIQCMnUgPoJE4V8Mk0yfshuDP5s0i15lrSYyra2USogcyhQIgCAvt+VeS4A1fwo1OxUkfhLy4ibKRjw9yMwsMYxho64o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJirzvvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmomdRAAkaqUdotcpAMvirjecoZUpcBS4m1OAhbhDwpkX2CIpoYbwYEw\r\nUubQ2K0fTfbXlH1hM2A+tNN/QVXuj3LdRPGVfSAYWZSGYEprrPBckkvDEFeQ\r\nxwridP+oazd2q5J1rztwmy8wGtkDoahhVVh8gPZKcHksjU18hlXlFFH5jd6K\r\nIooMYfAdB28bYwnnfiqthQM8T5aRAkgEUvqaD+Z69/qdypS2D0wUsqrY9osj\r\nvsYkSsqnFuEl81ntdj4M6nuOKDy9GmVJpC8phHfklG+obR0wwAi78HRzbPVu\r\nsK8wIbQCvrQ5gfOY2hu4y7WK7mrERcUywgoIvYqDwOk3627UU5l0GYVewUQs\r\n851n8s1YtDX/2MoAQF8j4WpO7TfhEAQ8sW525rirfb62vdluni7SEI9svtZw\r\nLZuvM6Dr4MlnfnNrTT2CUbzPQsdoQiktkerLk1ISaZzZlX4VbvnYE5QC3q8b\r\nyi8tjVsaw9lPEkUZmtDsiA3CwpAHk0PZYZzTC7wHTFrXdtA14uMe4a05XEhh\r\neVJnPnKH/u2OV+zow3387ZG13ck/OKGoXjRcK5NpAiP4IFwMVzq0XQyMN1cF\r\nWtyyqPqKA0eGEPnBoCKQ+lxUPDMi4VOVhJuqj2mkp9/CfK2oS6k5HBODJMQx\r\nF5OPncMv1Yna4lDePL/9XqlGUoyeGVjVe20=\r\n=FNSO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_0.1.0_1655651311718_0.8888339089680022","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@flexbase/http-client-middleware","version":"1.0.0","author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.0.0","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"ece94d34c9d5fc827fb0ec281f7961aef7626ff2","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.0.0.tgz","fileCount":47,"integrity":"sha512-8owu/TS67YvWqGYeQEfgeBigPoC3sfRzU1eRb/5ZiyTUdMXV+U1uHiXLnYIGVgfsCuT8m2uIvvYPciTymDKZsQ==","signatures":[{"sig":"MEYCIQCZ5qcDr1kzTAyYF6tD3F5wlj3FAaa+Xvimi46mOBuaEAIhAOqiNVufRynb3V/vvs3J5k6ktmPCSKTk1TA4uIeFkMYO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJir2WTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFKA/9HN72+C1wzCc/yq7idu1sk/9HxbpyA+w8Q2BoRiDHyxEJOAeh\r\ncqx8jA3VkcTtrjPncP8vxqfIuwyeiJvDcQ+L6LtPyo2wMIwSJGSRtKXOChvy\r\nKS00UWNeXRZhAcx1z7FzM8O58P1Qd8Wbbijc/YqT51ytd/HZS0ZD9MPs+6do\r\nfD09fjLiCyURy6+KZeRugTdJYeHSg9z14QkGSPnuMyyv7LZ7bc5LWlJXX5wC\r\nVrimEH9ijov0LyJRnR/bae90qjngxwVWT4eXgzmyxCdurkTExWSoCH5GtVFZ\r\nDX/Xo4PyBuOC+9cndF8MEO8217Q1WNtErtsG4VmkEpKSTpD6/eIOK7/Oz2kW\r\nIhCPYrpQ1Jxm/pyK8e0Ww431aEglncTKDdkw9IBUqAv3agUz8AOO5xz9U9BH\r\n5YA3x6VS046PlEcdNE3BM4FfGUWwkS651MrEE4G39mV1ih25r+2zIbGSDt1n\r\n/G5JeVUaY7AV+YOzuQoTeTqly+6nMYpevT0aUI2f72+sf82+PyPzofKDS2jV\r\nCbry3J2gKyv0WJ1XjknBdjX0kpk7l/lXRSJnVrPYNmEz8KPCp32gXmroFw5Z\r\nIRG/E4inER8lRZ8yrthVefQGqf149FcXl6LmPCGhckZgBmAQJa+TH0zSO3vU\r\nDhKaU/eu48Oinccq3Qx1F08oUHu7Dk0R4SI=\r\n=R5pH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.0.0_1655661971798_0.7141444625229654","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@flexbase/http-client-middleware","version":"1.1.0","author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.1.0","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"27dc0079ad5c4929f3ad1863dc4d22b568e9b336","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.1.0.tgz","fileCount":47,"integrity":"sha512-ehYJ+17dKV8e2UMZ5T2NecPxHdhrexeIB48luSslV4hBKWUVQfhccbEnVxQe1tmqJzYQ3jIfgmUYoPD83XXOTQ==","signatures":[{"sig":"MEUCIAoTwkEYLdWFUz4FbRUvTt0BD4eY44tcGw2Rv3NW9n3EAiEAtMGjNSPyJKyGQJwDUz7ldCV7xnJzkK2m95xWW+pcXTo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJir3IdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxhRAAkkz6VTP0f51aYbpNUK4IhqszZrSRetGwM4DYaZApgNvMV+x4\r\nHW/ihjXkawBod/XVJbaW6AKdFHb+CwWxFI0O5GFh5xjUZHceFq7Iq/NQNmJX\r\nWgGscYUrogdt7BNWjmOD0hs7I3FS0jaR1Ljsk9dRe7NdCYgwrj+53HsMYZ/U\r\nxzEuL40RjNezLZEawBtORcQsNufr+wjbZNHBPhZzU1WGc57e9v/LZE3Zbcc1\r\np8A2extRXI1epVI15NDNY1gYVQwvkOPxJlvMaVKPdvTf9GFJ92+JBybJrXgb\r\nUVIYtgjqLs4GzRCDBU9Shr/TYLDYrfn173mOBl5QLAYMVM1mGivN75eAqyda\r\nJVqADI0hK1c+gADIdl+z4IquawUnkP0adVuCMk6lRJE97QRQdpj0NBvJlB42\r\n4ocuht9sjxsFaVftr9+aCyGTL6no6vK08oJhwAdi8UajFDoGcOv5BVegg29M\r\noWE/J2WadNU9gz3xw3o+ZB42w8MW+1LkbLQ+HZ6pA0GVtdcPBP/SizRktlMd\r\nQGCO6yJTjxQhFt33e6PG70ctWBhzw1rD2bY8mDYtZI1mHHt0BiToTiVU9dCh\r\nVrrHlINWPok8JjZ0Ws27gvXHsdYTYTJhpxc0KZ7rM9X1P502hbK2JTjneaPk\r\nAM+jb/pi/8gVqHHQNr+YtqXNgBaYgMepzoI=\r\n=zXf7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.1.0_1655665181763_0.8913987218180761","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@flexbase/http-client-middleware","version":"1.2.0","author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.2.0","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"bd9df57b9299bcc0b44e317c46e80fd46cee0eae","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.2.0.tgz","fileCount":47,"integrity":"sha512-d+I9IHBCJ5tRtRbfwdDI/S1ZSwAU+u3MwGcRQVXK5N+H280jfoR2iF+CuZi+LJ4LDUqL00Gb8XOPMU1v6oxPeA==","signatures":[{"sig":"MEQCICG6r7y0/E91jYYy+qlUPm0+5xoq3TU/eR9bluehU3P1AiB41YiVfXv+aWTd5czHj1+W3EDDbY3DGMU8BGFHaQfBDA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJir3O+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJ9g//YMWxrgS5V6JtFm3NJlF/qpb+0qaWqC0saWpagAzJws2QFHIn\r\nIWzPdvdMwRsHPl0zXAqb5AfnZRpdaqAGcs9kyyF22Te4rHb4KOKZWyoRJwee\r\nOJ0Vy9CIx9kTfQDJGj4lj9IXzFZ5Arb1fJ9qP+ExEolvr6i7AeWgZxw4zKS8\r\n1iZ0ikwG97KaYzJHCz0agiIARHj1OpH/jBFaSsIVXAUfInCuWG5ctQQAc8MA\r\nMXaDuWKAUzmZhmwq9EH9A7XZ3Csvl7vD2rDo9CYvvhXW950hYtK1HYyqogOf\r\nAp89YRav2LlPm/lHHgmuLbTyGAMJaGCyhdva2a2Jv81VqUadlv10qZsHlXWR\r\nOzHuopV1in3Cud8Apexyd+HhwUL2tLx+tCq0s14q1UC/jbaJYpS0CDQkzN8i\r\nxtaJAsgvtrqMs4k3iJrtSwp8/4+CVs20UlDVzvAeUfZStNPtIpRKnnphI/Vr\r\nkdtUtYDkKyiBWBzW7g6J53ZROhJ5bT9CWLDaNRRv07jRkTi3V81mJsj5unfe\r\nLuFK+DWZWF/M527DddNhwCzC4FZ9IKFEGqIWu2N9ZMbPu7KZuro7QOdB7sVO\r\ncSB75JeNH+EIxrrvPnppsmuvmWFfVhBgITuyG9kd4UCKgeDdG68bG9cHAGPo\r\n7kJWaoKBLum7Fsdk+9BlAhOu5SZLvrqN4F0=\r\n=wr4k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.2.0_1655665597962_0.435478385982754","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@flexbase/http-client-middleware","version":"1.3.0","author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.3.0","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"9d23597113c784343125d263b04efef84698409d","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.3.0.tgz","fileCount":47,"integrity":"sha512-LjelYIFP6MtbmU2yzWMQAxz5gzCt9fBYkDujDdh6E5973gP9xFJiYbNXKY4ZsO+uSrmTosbKYqo68D/uEoaVpw==","signatures":[{"sig":"MEUCIEBdqTjxAxdkPNSJdVKUiMNHvITk4rSmeCuFaXOGZ28XAiEAh2gd3YejdEUvq4RhjvWPd9xEMoSl5wLPMzYpC8G4L80=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisG7GACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNYg//UMk8yHDmvE+e+sGSa7XrxpC0163tXqYf/eUznOAZtSwltrpp\r\ni/uY3zBbVTdCnY8kUvFEyap8Jq1FW6c/zXYYEuaFZPm2J707Mu2l42ZlY08g\r\nLTmfJz54pPiOD/TPUya3LDcKzTjros0OBhan3vV1ufb6H1/Co57plgrn4Z+Q\r\nbkYyzwdTBZNU09NQDKrUnNLjRQqVqWtuSNzphptXQD/4btIiDXUXR1LPMCvH\r\nUrMD64Y3P1s8J4M/LBbBOAKrFui+QbTaRjlWImngOCKnPQ2vksE7EjaCOP9+\r\nFnu/Ud9MyxsxEfBOGSDV6LSTuOplLigoqFqW6dHMZy/wASccteDyCuZtONcD\r\nQBq2hvRhmvMomEXnzjziN6uQO+8JRbWe5B12rb7H/apVZopVuX6KMo8bakdW\r\noIwWtAHWEx6gPi8JUkRgXNuHoti7DuQ6u9tPIQYabtlI8pWOMv3QEazE0WuN\r\n7mNlQheJNkvoO6wvkSiCwvZlFGAX04RRs6NsJnSRmKQNm+zXp9tUwMIAqtNj\r\nEFps31ATt38g7e6eXuDmVK9pZdCa+xLI2bFfJvtaiy9xUQWkTAHUCyzR7ODP\r\n8pCFPbKD58IkyWiUR/1V+jjUrvc/sU5KCGjsFSy+hK9JwYqI7CKyPtsvZwPR\r\nVuwFApuorfb6eEoaoi5VilBTQShfRLVfjaE=\r\n=A7Th\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.3.0_1655729861823_0.05608116948368558","host":"s3://npm-registry-packages"}},"1.3.42":{"name":"@flexbase/http-client-middleware","version":"1.3.42","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.3.42","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"1441adfe6143aa418bc2350143d85361e598acb2","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.3.42.tgz","fileCount":47,"integrity":"sha512-A/bVrzCqupKd7u5xU38lsI900mZCqywjbeSK9Yg1P+AGgFUOzYdiUGlPCSJBxTN3SxJbpIdykUawgYht+VOSmQ==","signatures":[{"sig":"MEYCIQClWy3i0oGGJ98teUsZYVzsaPK1FmOiTta/vAnA5AS9TwIhAPXpnXe8KzAFdx/U478+sm+ld1MUP6XW2oS1foQ1iaQ9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisHdHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfJRAAot1aPFUfNTTmU3iANA18wjlbjZ5HpsPdsE84Anjl/zEo0Vte\r\n/BPfWqtcz2Lv2aY4yGFNtlQvDh8gVgfsc16TR7Et/UEb5mzdJ0aOwsx6R2Bn\r\nOD6R3Ze096/xva9qlr6SCTZ7qY6UKRVPTl8eZOQ5ZcbuDbmFM3mO2z0jzpZO\r\nFFc3DEOcGh0Yh6ncTF4e8kiwfL5jsL/Ke0RE2kvs+kZNDjGckMCtBWE5aDRM\r\nDA4X7fWxoEFozdQbnak8MSWOER4anV3cJH1/49gFnW4UU7KQSwTZ4zikdKsB\r\nxbljUIapxdEnEcFZ+m0fTg/rI8sTUFdbUxAN1huMbkrWggL/DTN1mwF4R+CP\r\nVs6uRw+LeAeFQUXxB84nZorpSUnzN1wOVAxackOPMsZTaJOFTOm+MVj+P+Mt\r\nyyo8wR2YlPMBYNt6f+8GtIT8TZhWuMV6M4elOmWAGZbNeAY6jduUZXVQ341p\r\n7MOcfOLP5CQ3+tjUTbt+AZ/21Lms6qHpv8hKnMgsY+UL0wV8z+MtmMXp8i3o\r\nD1NoibL/WXU1da63AveFs75ZYoXbLGDdyeaUrXqcDcqTD2KLJgsUBHv/GJuB\r\ng6wmbxpnVgfh08c6RFDfAdXRDnmw7uPScSFRbMeaAKn3wfaBP6qOCJYn0XhO\r\nOvMenaLLvmK45TxRh7qPpba4vvZxhd/Bmro=\r\n=qCZZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.3.42_1655732039308_0.7455111273695265","host":"s3://npm-registry-packages"}},"1.4.43":{"name":"@flexbase/http-client-middleware","version":"1.4.43","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.4.43","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"66f8b1c48cae739f0fd211bc1402d8bb2f4ac4d7","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.4.43.tgz","fileCount":47,"integrity":"sha512-byerD+3ws96cIeTeTZjGI1K6rS9nSkxXZuhRjrb71b51d6RRVSKog3gLSeaamiPreY1GfPMU276TgmndN/KmEg==","signatures":[{"sig":"MEUCIQCLxq6eQqV1soHt1vzBjfxsKwPm2sVjDZG3wLH2rvs4sQIgGYfqSeESrJNOKymvTWuODh894Uu1UlorimXz3cZNFq0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisHgJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrb+w//cSivq2GCNibxGO/n+xdccPvcYuKdDhYwic3xjFLnN16EdYZU\r\nknLIDuyOBLxDVhu7jSxjaoqPlbQApSt5vM+XvlSb1qk25UW3hRWzeT6iwy7q\r\nRSJDnDudAlBoR3euuwSm7kuUrqKKZ/FoNn5O2POEuQz4gn1o07/JCe6CYGTy\r\nnZeFobK/fxtXV2GB/wf9Etz09oCRq3xwLvfc344lxHA9nI79pXNpo+RlhNIn\r\nrVBCK9lhwrmbosDsCMFyR/Zgxz9fjvLEA7fCkTXizKDXSzpmLjiDBWm6sPhi\r\nBK5fGBv5KR1Vo/yu/QXC4pAKGTn9w/zU32uDXIKQulxVElMnWc2+tW9ZGHSp\r\nyQPnp1PoZqRrueUor8g516gEQagMyby45EYyldL6ji4b9+RUbcuECPXjOXNW\r\n2BsoQ2XhhOBAwovTuHFrOersY7YJbKsn0dWr2WOpw39ctIFVVsWBfUDXUOo0\r\nFhlhGWBhMxVDuuebkASGJOE+7USTp/VU4KA5lJSHU+4+eBa20aEvhy1hnzyF\r\nF4vKvSazzEuvRqM0pKhB2tsBJ1DMNQX6fbgZRbpVKqwuwn5x0WGvNGXFyEEi\r\nwdkH8qmFrTU7LFOYCNZri1VIKSXaxdGczcrWAOmahei5/ezBzQazpLSUY33T\r\nNnyzLY0JzpPhj84As97ZOfcys1s4fRSYtrg=\r\n=yndQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.4.43_1655732233513_0.12391309648231896","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@flexbase/http-client-middleware","version":"1.4.0","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.4.0","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"3b444b20a8d256e42c500875e31fd1b5ef8eadc0","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.4.0.tgz","fileCount":47,"integrity":"sha512-07abnmtYdyAL3tjKRQHi7pkOtLaTyLWZKbBl5sVCq8q+tb6EDYn8zZLWNR7Q70Ly/bCF/iH52sM58Vthhw5pyg==","signatures":[{"sig":"MEUCIQDrfso1pKrICceSbA9bs2ZCVYpN4Yy9Trz65jaD+iObZQIgcukssiO5+QiupKWaXosEt7xFFEKt2I4DR/bXV5Jj7o0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisHi5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhMw/9FadpNmut+LC6vfKV/PQ8OjXVHAoz7YQwvwtnagjtUVqTk9st\r\nCoB5bxaQZ76363NNQeEYUYBJ57M/JR8TS64mJi5wBCwMqF8TXIZf2T5ZVmtj\r\naMw6vCDF82e40VsYlitqh4ZUzU/3snPjQVUcWwKnR0/MkYhlshfTqFh+Rjuo\r\n8Q17YGpphSmyDCvpmgbihjyZsoo7ynf8V4xJfDFJ9Mq/MBZCLOEQ2X7dDmYd\r\nxexRyjlOVBmpGgaEZrti+fqbTR/jfm6ewRe3daPyChitf31PkS5gL0rxq1+d\r\nejfSttlVQo7XIZOmyRFwOrNt9j4FaS3wj3GgJhk6DyBzWQhqW/DVsyvkMg1/\r\nHI+T6kIOzBtUdn2Be+SLGqzR1MrTcJc6V3a5MieiDZnV+y1vUozMZ1cMTbAW\r\ndgeCDLWrNsewu3CyiZgleqMbCBahZgEwdLZCUy4DY0kFl6tY/SJ9sKJDZL96\r\nwZX317ZTTQvhjqf9TRAzsCXV7Ap18I8/+Iex9kLhK/R3x5iENT+EomPFKmu1\r\nmK2PxedvmFhaZCHN7nEfhS9G+rpOnf17jM5w+MRj6x/ARjbeBSHfeRl3euC9\r\nCl6WX5bA1YCupCp3o9cSPMzVLdamX7mUUc/0x4Og+TaI/+v+GGRnGbx8M5iH\r\nrgCA4FZlblgjLs4oVK+OoSp5yULO0bKG1IA=\r\n=DP9z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.4.0_1655732408931_0.33685237782082034","host":"s3://npm-registry-packages"}},"1.4.44":{"name":"@flexbase/http-client-middleware","version":"1.4.44","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.4.44","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"b3c7ca4fd3146181c7d00a55597d21c73410e7b5","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.4.44.tgz","fileCount":47,"integrity":"sha512-LqOvkfx3/E6W3hmZx0DsJsAp9R/9PU3Kjs5Yo4skvgTPf4B4oxDmWMmG07P7tlLmSn4vDZF7mBrZ7Hui1+APWw==","signatures":[{"sig":"MEUCIExndx7WuKzWHSbNjL2a6FooNMOiKnL7ynoP/QFpYbuWAiEA94hNJQP3l92BL42IqKdkg2VwlBN+w5PKY8300VIFIPw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisucYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJAQ//edRoeCNJsAxZiIJrlFXVmgeszD1wbeU97l6RrmQaQAg3mUXy\r\n3LDuSLD3UE/Ys0sDJVP2xQ4ZgMIlbbN7uJvSDZUU9S67mjFcmMX6oM+e3OZJ\r\nvSulNh1v100gQ3QoPUVAzxe7D9DqS0RPEWeW8d4mfUBfo3Bou474du9enybn\r\nOTyEuXRBCBkMW1/N+K5t0JP8phXyn+OGrkShg1qaYPlkhgiGmXYvispzyX3G\r\nOGxgGJYbKSvwjmiTCfYjq7SAwqSJlijLWsmyToFscrntdLp5GtQLOx+exC5T\r\ngQwQ2TEX+Y7q/Vfm+xb6Jlz33gIUq+ThwfedjfpD/lf+Cztg64/zlVOOEaQu\r\nXV0Q8gOG1760thq2CbV3efhfmXPIU0tPSTM9IWKdmJptTrTEDLSKYbHK352h\r\n+0ES9FjrWdYO1BpYTFQ4UFc1GwgNnkZxPNLTPQ3jbvYmo/w5kX5GyxVSpzEB\r\nNAqRpuvT6YKH709ngl6+UjSO4Tj/i0qfc+GzazNEL9MAmr/TZuUBR3BBDY7o\r\nWo0D8g1C2RGhQmLgZ3NWISyc1Pgq2BEe3/yOw8mMWgn6gJgMNcDcmcUo14iW\r\nsyaUuJYZNj9tsN12fQSWmAdFwLbNmAse0JYgGdYiDMeavFjqATw9ZNK0WvDU\r\nEQyEl8H/ia0j1XUPIHvcBaz8cDybMinIIuU=\r\n=Nzj1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.4.44_1655891735846_0.17122494681303246","host":"s3://npm-registry-packages"}},"1.4.46":{"name":"@flexbase/http-client-middleware","version":"1.4.46","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.4.46","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"a8a0b8fcae44ddbaaaa8e0a5dea3208acd889257","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.4.46.tgz","fileCount":47,"integrity":"sha512-woFh4+ENYC2WBhin6VjXkwzhCw/9C5GvY7XxVHCwDGqHxlilhd2eu5jUGJQDEQ2ph8QxjDAs2kJ38zYk/jH+UA==","signatures":[{"sig":"MEQCIFYpqQAEwJTWMSCcRA/9OF1dkNTKT8keIFjLUxDK8Y83AiAXL7v5WKWY2XFrv6HXF9YKC3fqluhweptCI0jbnJ8oNA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisyUAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpyQQ//a09ntPvBz7TKC7jPDygmlEHxHRCBuYLAS/4Os+LMrljn56Tm\r\nibsPDDHLAZaNwtrvQPOZB6HRgbA7R7eT5oVy/kJnfBxAPp3Iok1bwHrO3iYG\r\n35H+yTiuNcCv7xS0en0YH2TDkuyZWs5MTm48rsuBtnoKl5OKOLsOR2xfVFBd\r\nBiV7mi8PTgcJLyfruoZ7OWRY4T4dR5/ZcCtDBYHrIFkdpKGWPGkn/dwmShi+\r\nbkrAPu7qHTV9Muq2NYgeq8BluEXgelUCbExTnV09iPIXJSBO+RgL6VO1pKxS\r\n6Q9YtIDBosEoUjQm06FnUu26xhqDhX1ej9dQgsr+Rf5uKGulqgBsi9l+AO9a\r\nUoZjzd/4Ib9CQQpZGYExoNkUycgNrdbpOjnB82U0MOKDhxOKB14mxLZgQH1m\r\nq6VoXpX7WMHRrlf04ifmgbF3qfyYJhrD5GE8XduXuF3O+tHAEo710IKwvB4j\r\nmvkserO+oGQnFRr87oHCEFMTGaLvbo+sZiUu14RkJpLlHxF4W80lSVZOen/M\r\nmxRMDPGvTby6azDvnYjNtCPoofKTVOQHHoYdyfvwXp+zh2xvxCT6U0creH5H\r\nPlJOZ28mBGEn40sFzOZPdSOAU66jkhbvqlJbKe+MVptwNtVt+a4xRLM+bM00\r\nDNbKDEGkUIz/6abigCNgfjd8TVqkPiUKlnM=\r\n=95jT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.4.46_1655907583751_0.032923639219286205","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@flexbase/http-client-middleware","version":"1.5.0","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.5.0","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"df015c165baa7279f01bebd2362861ebf52ea5a8","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.5.0.tgz","fileCount":47,"integrity":"sha512-MZWnWDUI2H8M7oq6B2x62P4sr2N5E2f/tm09J3Zk4E+wzSt1FZSmpAS3SI+DfN5eb/Q5e6OA33o2axOZ0NJEdw==","signatures":[{"sig":"MEYCIQCyapXOrx+CCk63XlrcGZhyrpFYc8BIoAOpGGXJWqafOQIhAID4cnfHOQ4ZE6jFRN4AwJMNqHLWmyaPdV+RHCJeeoiw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54563,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitH3BACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpMPw//aHLuFWJMlcgPsn24tod5JfbLRXQx4Aj+b0+eHb0uCgg+mURb\r\nCiA9+OeXnNBgT9ulZi1aM/poAWCgjROoKFTLdF3AAmUrE6hD7dSDzh+knAmU\r\nfnRW+hDMHm9RjQJW8Sfdg8yl8gnv1nhPx2WOw6EjKQ6nMQC5EZfIyxyUzW6s\r\nvzbewWNkjV3sQRzsHE6ggbUxpDz40DsTvEWL/5alcd8C8HS+hpJ2F93L9kWF\r\np3aOoSgyL0XGvOJ7lxsqeqGdW9Bc+Jp39+ZUSktYNyTwev1AJUHH6YsFeOrL\r\nNnDDjTWfVnpxfdw7gd4uJIPqAbmwPIOosPdtPp6K6Hp6AreQ+Nk2NMbUujsJ\r\n/P1ddbJ2DwoffHI6XcAajAvirebK+CXtsGBwVSMjKeKMdG6dFRlqt6dShRc7\r\nwZVw34E8x1tT/Tq3pTFDPgHmztNEZY+NSsp4ZTTud2x4Q7ZgeaHKc0CZxAwa\r\nSjHn4HbtBmpSD1IYyYu0HMRb4D6d7len6NjNhRe9aM6jDoL8ZUWREJBl/H0P\r\nEPo26iygsfdylTHMQNdGeV3QSQlQcB+5/UhWgOKfqSgJEmBwHsTAKvOK1BhB\r\nKpAKyQV/NeoNoEw9qxbB9mWsl3XMNwVxaj9gLBkkrdZDRrYdgH7O/YMrPYaq\r\nfbgX906xdpAlo9F9z53g8vTwnhWX5KEOM0E=\r\n=Kji5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.5.0_1655995841705_0.023736371216584562","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@flexbase/http-client-middleware","version":"1.6.0","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.6.0","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"e612b279b7bb45074d4874d154f006e1be89a75e","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.6.0.tgz","fileCount":47,"integrity":"sha512-AtnK/vHnf6GUVt4nuUV8bZRCz1WAMjwKrUBUwU+RYS245pz1ey/GKirIQMrmqvHCy5olhmv85zeYMd5oS0GZog==","signatures":[{"sig":"MEUCIQDFADOT1l4czCK/clUy4t9Nm7naJZcBUzsGIPpQ2ks12QIgJOCyD3bzhjZWD/iKckHhyczdIDnQjD+wnd1eDeIjfOA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":58888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitKSJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmre7Q//X2773DutH+qXnVLOas1nKAJfTui3w5xlS2u4twO8Q+rCB9Ui\r\nUSiF1zsb1HwdR4gnfhFTues4P/HQoeJUG9lruOgeomeqTi2iXezk246QOGfb\r\n5jEqWrXCcyBnHBAPO5l3UIaPFsYGSdHK1D7evpcmmYQZUvVL8insuTbLK0je\r\njay2w6UmYlu++NhdQpQBXrT/7BxdDI90+QX53TJPm9dLUKuIFXIQ0ADV6QJa\r\nOFmd+x+TmOmK/4jUpEzVI0xgImVFEdSb7ntZu8765GcGR6IMuMSa5jus5uYa\r\nSum56p4yVR6JO9FpgWTyb5XlY25bm0OckvMHO+0Ldh8Je4IO79SbI4yqTV3P\r\nBpyklsvkVo0HjklhwLE3PDkvTDqSpspJ8kbDU7jkzjEGWXaDDZtlMLVznrmv\r\nrcgDbuQZjAOJM8TqJk0UKxRB+2pHi9b/ssOjrtzzoZXfdllwRL/oVkfj5SBR\r\nptugbQtgVHvQvPB1EgK4y/JgpUWsSh1pXoFCtVv6PSLQvr0LHl7sMkipNMzR\r\nlxvzK+Vnwuns8m0pKZuAXovaJzpSpZW4CkokeVOSk+Wt2AziessDC7nhAVlG\r\na+XboXIC9N7knZK95s6ixfe5nZLYwu0pK/Ag3ElQO3gSWX/8cKNFci0Vj2aJ\r\nlGL54mRGaXz9Fz1gydrIMG2VUkE4GdWGofI=\r\n=SlLw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.6.0_1656005769084_0.1881534650089387","host":"s3://npm-registry-packages"}},"1.7.0":{"name":"@flexbase/http-client-middleware","version":"1.7.0","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.7.0","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"8bf8e26d65aac2856e80223ef79551f38589b05b","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.7.0.tgz","fileCount":10,"integrity":"sha512-xiLFcM0D6dleMpr6N3O4WVInVcpJpkYAlv/rnzzLPCORkWQ1hhos5VMpon5VvuylYfEpDjjAJUr4a0+Op9a1+g==","signatures":[{"sig":"MEQCIHvT+AZFTn1mOq2HbeDgV0VwZO7PYQrUqO4em1NWYPxrAiAwLsHeP4wTDck6u5QV+CiPi8bV1yykLPLCB1et2KV1RQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitf11ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8LA//SPdkrhtGjywOFyxH84zb+G4WMIWGxQNU+BnzEmdAXfx2HGa9\r\ntxGBoocMjJyvvP352R9c4DQRFHOWwUvToOOu/dJGZb5XTBiGBfycIERjxCRX\r\n3Ivt6BYsyfNCI0axhMU3u8h4ufUdar/+Qp85uzZ7TwLdpS97u+qJNMia79OI\r\nl6kRVoKFC3xwzcbjG6MvGyJcTnyclJm6If6d0GrzDIj+bUs9C1gOFZxlDr7w\r\nqwuA/vOp/LCo7/7/z5Iq9yfcjL0I3LBk3GiUy3UC/JHPake7ZaEHL/gL5RL6\r\nN9/LrL7Gzs2jA0IDmYeMWyznGoM0cy3ZPUZWj4rjTBIVkV0HsnPyi73zmKFd\r\nZ3WRZK1UJKSQUnB5gK0NqlYw0UfQzUmUCRmCy+s1aOeECBz9lk74lNyX1p8J\r\nFeinI/RIUKYIJHeYlOJfJQggjsfu9Zk/ZYMOYtaOFYhdJ5w8Sz+TEPz9eyuU\r\n2+8dEYVGHUTyoh/U6zBNjoiC7jxdw2uW/rbkNyF5GXrO9sOcxF4ktWZ6h8b8\r\nuflDJm51omfIvYfdKB8XD9IFPWWsTlYLeYpeN8ka3sgpOeAXql6dQLQibtzV\r\nPB6ZYndprnhtGQekif2qstIpGBEWxH038qQONqLcF17lWNQ2/an4jrKdgQz9\r\nIjKNvDUEkzlUatQahIGqRLQ+2OPYzur6axs=\r\n=08U1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.mjs","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.7.0_1656094068529_0.4935144792351558","host":"s3://npm-registry-packages"}},"1.8.0":{"name":"@flexbase/http-client-middleware","version":"1.8.0","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.8.0","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"0e0fc9e1190f1402a4108bebc71011796039aa1b","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.8.0.tgz","fileCount":10,"integrity":"sha512-lmCxPsoNMyJNazHtZ5tH4g1494o68knN+dT7v9QbMek430ulwplj+ZL3HCMahjOs5kV4W9ZWTS4GN6vx8PfjAQ==","signatures":[{"sig":"MEUCIQCwaPGZTGf1BxvZuveyfp7ax+KzFpq2s6Ry/L6we+wBMwIgV4ignwZ5wvhxD0Nh4OKErSYY0FUDgYyolfBCW0N7tNQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJithx+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmro8Q/+Jk/+w4es+d9xfTDpfNCsdP1++42xSiFIIGqVgH/l3zuXHf+/\r\nuNy3zuAAlFY8fsrThsnp+Ni1XLwkUsADmVDRhHh0E8rczOVSDs7fCp5InOWn\r\nX9uZqVyZA0wV31mxvxt2u303tNajsgng97ZTiW57h4hgwvY1JUhCR2o0hNxm\r\n6kRZG9uGDYoygVfdDK5TdeGbCB3qsZf1v1G8BndoAl3f4ZV7NHrrLKer+L6Q\r\n0tisszk+DxuwsgRRN8tmj2mBDf+83nOnybl7PjaqXu4Y+pp5hz/kDOlSgEK/\r\nfNLSPNuMb95dSqwS4xqwufC5gpS/aUYwKtatnL2AC/QTcqForZA0S/IW9rYI\r\nDKNeMxY5HRB8SCp8BQLLw4mhgSnr6qipATbRYvxJiiT4iL9iAVjFTxZfuxH5\r\n7aCdx+gfMLYCsR/QsVCvnngGd9B3E5CYqBTXYv9dSeauuKJ8N8IzGujA/9Dd\r\nQgS+6VRmVEa33E7LrDycbYG184e5Cn/GTFVnbAk5fkmsYK5X6+gs0VoOmER7\r\nPDWm0/FkEvXkeSPCwTcPhuTOsHMerzm7asgu4AyIgkyAF6yOck9XnqsyKXF1\r\n7wjI8swtuA89AgF0D9W8igqODd1lfgBvOpZF73kOwst/y52FQSl9Xi5RtDvj\r\nkLq+/kFmkc0AVAtY0QEIJt1ElLkMwSFYKbQ=\r\n=iSvw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.mjs","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.8.0_1656102014354_0.6791279859587127","host":"s3://npm-registry-packages"}},"1.9.0":{"name":"@flexbase/http-client-middleware","version":"1.9.0","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.0","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"4097d6fa99fbe8c56888c8fe3527dbf5607f3928","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.0.tgz","fileCount":23,"integrity":"sha512-YfYLieJM4tQogXnsZsBksHlU0CMXuppAnociqoniVFGI4DN3/+pZptehQG8iky0FF/LQZwyxUg1CZgZGyBhpQg==","signatures":[{"sig":"MEQCIDtOpRZBPZeCCOxpA8qyGoQoLSHky7YYqGV/S/XZRcGGAiAc1+81ZILEJZexlgti8gYi6ifNpruP/3fPAHGFP6CtFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitxl9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqI9w//U07wIt/Ud/6dOS7vhYscwSU2fqA9LNwlWEFmn3ioc5pnqZLE\r\nQ11igvxptTcat3m1onpjnxay/N112+fYVZ0mTk6wyJf/4+NlyDrpi0b9VUQg\r\neXUOpyBciNZQU8w8kTkdYIgVDzCvejk/N44eE2633JuwJyWsSR4cDQ1u5wJh\r\ny6styfpIP4/K+K5foRDN0R7EN7llD8/ewnxpIBqWfEhQfkYeaB0CsloPUScc\r\nCxJYE3KU7UtU4GzcMgpVEGFFsJ6838qOt9dZFoK7aDQyonyIi1GXbypIwpPq\r\nDPt+8/U8j0maon7EyCSkDmOmN3gr2XUhE8p4zOk0bQU2kEoV+C+Py29IAaWD\r\ndl8/OKhrd5XFqQYbYrdKHN88vNZXezoAgK1pZQXjKNpEm9y0/N8sCU3DNBPx\r\nJ8bG3sbBSHpbXKQgjqjrPaiQcpsriX6qaWjAPgnUBmyCXk8eOaCAsLyN/d/D\r\n0yXH+NJLXi7yDAtl/9AZMs9zScjNhuyaZG5WL3xTDUFEXUGm0liMrST1ZkTT\r\nVu+IJkCw23a3cnkd1lvgqo4mQm1ayXwCX/NyS4QQqGG/rBeesBaSqico3w4B\r\nu9Lx4RF8SGqP9jNg5dWoX7KCjuLAGRb4ZIdPqCl2kb4YpXkiNfzNj52bmseS\r\nQT1x5ZpRjAjoTT1dXsSLCFehZ8hL4NsUVbQ=\r\n=8rOo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.0_1656166781406_0.1586455747515063","host":"s3://npm-registry-packages"}},"1.9.47":{"name":"@flexbase/http-client-middleware","version":"1.9.47","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.47","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"74a83332f99de2f763535830058259aafed644bc","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.47.tgz","fileCount":23,"integrity":"sha512-wRlmeZowhlRhMmSOQFh4l4VcqG7gLxuepzpQ+BfHzyC+GpfZrl4RGxHWOSkYk3+tNBbE+pkhuCxqsFwSkXG9Xg==","signatures":[{"sig":"MEUCIEm9kljMDo5T5QnxO1Z7HFfLfcxOHoAdY0/O9htrp+/pAiEAub9QGcoYQ7PjPAK6Gmymi8eG39MZLkO7c8KNI7m7WR8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiueNzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpb2xAAiFtAUYjKNllNYA+QP46V44Jcotmyp+AyTASdapZyxueYOA96\r\nGst2UvyKtVoyHEulMHrczwhvxgxn7+Bs/jDyVY4tHGl0Uc27K8cHFiKjbZ/0\r\nuRkqcjdGgwX3zvjsKn9C2t39VEWpFR0tK8dzPnBAgojYjMuhD/lHczX+DaVg\r\nMrcEseoRUBr4R3tZnCmFix9hUXOV7t8t14E4w3Ojc2V191b9HsSSg4SsNVQm\r\niU9jBfTTGy3Kx+TICglpTyy3iHhFE/5oU09B3EWyTzXbL2kC6rfGUO4bX6Th\r\n6UKGjSz48jevGpulEb9HJ3fyprkcC8yaVtb4SpALQorXONzcex9MwQSKX1nS\r\nGUYvhXPUpe02biewU2AE42pRFeKIXn9UtqLykkksiifST8aJObe8peE2oKqb\r\nGoAZQRO3Kq+EFNMU39CZWNktTGVfIu39wGZjUimW+4Djkkr1VdT90xLJHwNp\r\nerrHvTuBDYCsD5bBK+wYsQP2OZTw9eX+40IttgEGf91lvjFbNOZw5fv9LdK8\r\nSoubuNHraQpZzp3srXIiTGaa+dbk4ldh9ieRQ1sIktjviD7KnxeRkrCx/T/W\r\npyBT88KhOBRoxUD8mKkjDCTjtawUhhilH0GZCfINyyZsBJQj1Efqs+9sjMsM\r\n1FMYlWPHfrksMmIsNoWS3yczxOx/87ElcGA=\r\n=XBHp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]); \n```\n","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.47_1656349555699_0.205277065149561","host":"s3://npm-registry-packages"}},"1.9.48":{"name":"@flexbase/http-client-middleware","version":"1.9.48","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.48","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"fdef7fd43bc4c19bb99af2b562760f4e9f86470f","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.48.tgz","fileCount":23,"integrity":"sha512-DgMt/2LrHW5ovhNFJISe3nTza6vaj1U2J/XYpsuVuXJx1LPRFYbicZC62QEL/AijnAehVAZqvRO5AY5oMwBknA==","signatures":[{"sig":"MEQCIHZpHxfF0P3f6ZcOqgjEkacTRYRo5Td1yPpeiorNLFpbAiB/qH+VhMQqAIleNUqeC4pYn8f4SQyA7WCVMuQEPWcDjA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiueP2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpk7w/+NFsuKPmGqjRFBausKl3Qv44Pi+FO3jcUeK3r5gwa8WT+fbTh\r\nGiQ6ptJfPCubc+8kUxqZSXHzFvNMDnNbMtYGIBEp7ePBeZ+54re08N1gO2Nj\r\nNWMZBkvn6fIuDGn1P2SBcbbGxqShTRR6cJ+wEVAC+9YD/JPQmGylRBhrAnqC\r\n+7Chmzrzmn0N65HXOS/Si4Z1iFicpUPqYzGy1kVtuykmiKvqskrtCpzMoYjP\r\ng/sbO3MWnydz/QOOzWnhzfNOQ3VEpkcmmrGCm3og/N0DVUgrC38Edwipbi8c\r\n54MaVPiRzCFxrbjjveRbuhE3wlPTNZUPgljk0w7+HXhmW+AZbQGUQ0Ep6A+e\r\n1YxHbo9VGR/mpUvKrn8S4puosaMEQSOLg2GuiuRxbr0uluG+ShQ//193j2c3\r\nyExh+ySaMaji5taLjZnaCpfNWufhmrX+iCJ7Ag85/rMRMSIBRDiBaxiXGcC0\r\nQmccLTGqRpCOYlk0EDZ5/g/SvQvP14hi3H7zzEWQwC+VMW2IpVXHFahVQla0\r\nmuMT834+8zRVeePUit13UReKovU0FOeI/KEEAcxRldsev/ti5GNEL/41uKjf\r\nWtswu+W5tByQ4QmMhqyop+mbGc8sGcXP061B3YpZ8UAtDqc/wBk5818NDBEx\r\nkz7KmUd+qlxu9ImQjEt4rCkZ8YGYekx4u3c=\r\n=AAJ9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]); \n```\n","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.48_1656349686731_0.46636110278891607","host":"s3://npm-registry-packages"}},"1.9.49":{"name":"@flexbase/http-client-middleware","version":"1.9.49","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.49","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"f0293a2a66a27db0b96e4d38440798f8249de59c","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.49.tgz","fileCount":23,"integrity":"sha512-gDcSTNVWwqTbqAxp2qFbr4+1azwKrbTCDteNpYtlEBWP6XTB2t6qeTZI4EAiCyiMNy1eFTvwzq5mpERSyw8rnA==","signatures":[{"sig":"MEYCIQDMFnC4vont5gK7ogknflo2MyWsE54WAldOyFu0yfhbZgIhAMLkZMpL1RZSd89zSYbm0e84Im5sRkk4pubjiHPkxi+h","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiv0HgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVoRAAhLD+lMUGrRqOwi/QtwUpZ/3aIDOB7SHSRU0Bf6lUvEYxOEBJ\r\n4IBs4vhD/JkSDpz7owe9QEYgKLarTsj4Sy/HjyxQbrP1dTB34ZNz1nKSbf9b\r\nyj57oiqzjp3J1JUMF4sfwTmeINv6nw7ddSNl1O3EDOeJlAyk7ORl/JtPAkSS\r\nlLj4Dz0RAc+dEeYmBHgv+OIkiNobqOvJzwkMiKTjL/3FHH7NJAMLNAkrdskD\r\n8OK+ShIRHtCIzvxUYctWZGPF5WyaTPS5SzT7+hVV0C7yCn80fh743sHpns1Y\r\neIVSWR0IEZt12i0nkcdyz0xWmMiVLl+9uLte2cB52mB+9WqQOiAmTf1UhmqO\r\ntW3ryPyvwrW3ZsdKUiDj5ZDxmHdjomvDp1uQ0dk9b+WivWp4XeVnFndpbM/c\r\ngiDdllWn/1PGRB8NSpmS5lfbSB7VsDQQQjNJprHMz9hi0HUweHYVYsuuiymB\r\nJ9AYZUUJXhKnyQoroIVINSp2IIZeYhQQWlngAcvkFUpDQzoAbzq0leXUeeMf\r\n01eQPEI12K4S+ZhvBcuILNumHEHfaWCEb/8HbHnLs/dFCaLawgaITZ5m9Dys\r\nToeL96bX7Tk6EcYwMpHXsGRmQNGGknPRxv44miqNvNGiWWVQIuwqXB64ylP9\r\nPzRiV5CUgMfuAcAGq3lL5Q3+xBY9qv6oSfI=\r\n=lRMy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.49_1656701408553_0.020598709585117447","host":"s3://npm-registry-packages"}},"1.9.50":{"name":"@flexbase/http-client-middleware","version":"1.9.50","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.50","maintainers":[{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"afab09da1ad491c94a01daa2bf5a50f16ebf30d2","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.50.tgz","fileCount":23,"integrity":"sha512-ROlXi6l6HV0B5p3Rocbwn5aglJqTRpjE4G4azios+1F109COfD4f1Je9nc0MeWkfgum8L3FjTYnaehhYj+y/BQ==","signatures":[{"sig":"MEQCIH6UPpX7fvqkzWTHVr+VMn60xCwNWuOfhJaui5cscmDHAiBWs8q0JoJfN0SIiVMfB0Mr2+TW8xf9x2tCOl0DjpluUQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiv0a2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3nhAAjwjJaUYLVpMAYLs/+uLKeKe6u5T2rtIb8R8I4dJct0HcrL8T\r\nP0twZ+tyDq70/LDOCwFL9bHFlar/+7TtMgQuyHOJH8DyViK0F4GVjYoHNxNa\r\n9hLROnhkqsgiNXWnN0KmYiUX2oHcX2V+JgXw/U3VOgyC9tTDcqLnzTvs7R8y\r\n8UOkHsSKwW3gyzM1d2wsR88qEoc6lkA4eVVFygAIWPSpl9SXefvLC64WjQMY\r\nWST7FYoeQP5c36Zg6eLe16y7rtaDq8HmCXLmcgfWe4rMvPXKYy0nWxE92wR5\r\nDvSVj7nIexDuCtFNE9W0N8ccLU3/2anDubyjV1weR1zubMI7GdO9QjsHxEA+\r\nmXCm78O+qMVekpCuDu3fvudlFwkomwlHSsn4FyLgAYG2o/NNx/L4Y58tSQka\r\noJLApPi0LNg0i4WetztoMgImmT+j30K4cMOTEH+xQkXOU1ZJ8+tp08HaD12a\r\nB/80zz1xdEA8qCgxY1YzTwWuGYKsvlwmO3yi+6Qa9KPQcNU5Uh586+BNopCn\r\ntUPK7+BcjwqbJmlJyZ+QFracn/jM6NYxGN0XbqD6UuHfV8Wcn3iA6l+qiDHo\r\nnkcHWsbTwP4qFi38HmpuykB35InhY3FKCnvrqDwmNHyAMBA+Y1g2XigwmgCY\r\nLzKmZm4HWl/dB4gYp0tHlJkqlnUaQd7Q++Q=\r\n=Ha+t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.50_1656702645756_0.4983043764747712","host":"s3://npm-registry-packages"}},"1.9.1":{"name":"@flexbase/http-client-middleware","version":"1.9.1","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.1","maintainers":[{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"bdc0a40b3ca58b62bc4b7af35ed87f176a08dee0","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.1.tgz","fileCount":23,"integrity":"sha512-FYYkpz2t4Q21o3OAXhmmENCvVr6sXXPEJdLpx35ZB2HxsXdF6VXVNvoqHD20JO0FyP0h763afUbWZPqeACBJ5w==","signatures":[{"sig":"MEQCIDDWTCzE0dbl1+dm48TzLH6d7B/T+5rhmAVjbQPwmQGVAiBoC0P2Re2JtpvDFLumNqzgTAqZ4l74jnxICreqw+bHgA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwF3MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWNxAAgltAYnGaJIId4uyAq+oTj9Iky/GQduAkAMO6pOSimjuoOwc/\r\nBpqyvSEX/gIFcl9iWw5zQAiH2nVHX3rIpFv7gLltsmpj7bpHAnWZ/FNKoK2i\r\ngzPRLy5Q70OjZTsYfAanWbmm7sqZRipSVTE7Zi/cgkSyj7IQqtyfhVVEi2eQ\r\nei216EKopL8ZOfR8JdkgvFf1Ql2+Yy7ePjbUI3wX0iKXcfXfCJfBHg3Tecbi\r\nhKifykJhJ99FuLFXR4UTgCX5jNUDuBWjDpNpIUNbG33Io/1C/Ijz5aqHwacc\r\nIArV4uzPPFpZaBYiUK4uxjItMWcm9sAwOaHVx4/4/yTwgLwYOjnjtfAb7TjW\r\ngTe7p37SzRu3gUw2mVRqA98NQRCg+thuHFfHF2UiTARuDf9VTHoJHNgmTmNh\r\nOzbMag/aQuTBsYu+ArNKkQ9nokgKIvoce3tbqvlRrjaufFVHBG4IC4iCPMz8\r\nemWcIF/yE/BYpNYakbq+gQROOsFxpAFSyQ9nFBgXvvf4HqZEannlapkfoOjb\r\n8WYyEVumFzQNTjiMTUBoTFJ27uBQ/eLnpgXSwoEppKSFu3yHBnWrJWnGvwvu\r\n1A/S9JsKhx6VZbs6zOZ2hP1Zjs9E3nNlIfQ0xYbnMu0ZxEVfFVkiBg4Mncx/\r\nLAcUhQ+gqb8SGAaubbcW028cxqNdYq2CL3k=\r\n=bZlg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.1_1656774092015_0.24257144960417243","host":"s3://npm-registry-packages"}},"1.9.1-beta.8":{"name":"@flexbase/http-client-middleware","version":"1.9.1-beta.8","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.1-beta.8","maintainers":[{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"b59a60f677ed11470e56b5ceda41cdec3ebec3f4","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.1-beta.8.tgz","fileCount":23,"integrity":"sha512-0UrDbcAuQga+tpfB4MrITV8Gamk3fccsWAyYNT+pg4NcXWNCnvW84fTKfvNq81MaUd3vxFM1futhgoHIK67zDg==","signatures":[{"sig":"MEUCIQC/p/x4OSeUNb4Oxl4dPrP/HWM/9dQhwDWOTxQ6fhBS4QIgNaJcQD/LR2vPWLCRiCJ4S9QJ+BgPE3JzYlU7ovjUlrc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27330,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwH4ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPCBAAgjh2uzGNZvxjatTJNi0Kuupl3TSAemZxrHcjORTwRZBXmuqE\r\nZJX0rO2+tz9hqZmeZk/9v+6gaz+3kXNF+26nGQ4ZS9mtE67IHjk1X5iMrF8O\r\nrcgf6/tfndn6HkdPae0PR0gu73dbNsXYwtBttP5nbei4jQQp35rrp2hxv536\r\nk7Hsy1l8jpQxG1cyI8eKHsKkoEM4Am0Ydop7XZ6G8PXqgGbpapA54JFNWFsw\r\nHtKJ/RYFUVhsmIYVTDAwzCqbD9Rv46P2/VadtCvB2jkRwoD4NXuf+DPAWGRN\r\npUSOraI8hXgcj4GNnqCtnXS4FyMnTWOyN8/vOYOZtutteSvgzvRUtkHJgaaI\r\nw/u5KKWd1cHOj0p5YSI1lZ/refy/6Y+iS+xyt7gXSmTa+mFNNJBf1jpSk48e\r\nArLBiqt6K2PYE1WUFN5c/VKN2kYY7op76ORZIS96eM+/yvrOVKBtZaHKlhsZ\r\n5/KMhof1necSRCXRKxP4FGob9SZD3DLV16sIvC1ya1iAwXE3ASesV7eARUeq\r\nW7hOZjmWflcLXQ4ISPH6qyV0s/5uybTOoGk0ndozlYyekC+4sZwPMNfl6Ay9\r\nevyRu/idne8fEFDR9WSZQCAVtJjAo2QbKd2+jWtzI0RGHqxaCcVWq1CZRWGq\r\nQRFzR5j4evMnCGQu5oyuMG4MVbDEsNZkyIU=\r\n=ruyO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.1-beta.8_1656782361099_0.27581093353022634","host":"s3://npm-registry-packages"}},"0.0.0":{"name":"@flexbase/http-client-middleware","version":"0.0.0","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@0.0.0","maintainers":[{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"fb9fe8358f825265e3f6bcaab45b8fcfd9fd7593","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-0.0.0.tgz","fileCount":23,"integrity":"sha512-6ifePzHimuK04WpNhhCAsEVt1+AWurRmyHBWRF3FRYoVrgnTnDlv6bCnSm9VsAvR2TEbBmWbOKitscB+ZFFAOw==","signatures":[{"sig":"MEUCIQCIbg7+jXh6cpfaNVANT7vLN9/b94W7mY65wh4HrlCiKQIgaYAF02z8QtkkG1wu1rzOOhdpSAurq1fNJ4DhWqvzYB4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwN5SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpPlhAAjyk8LshMhHEBR/xgrPOEMoJcWd34iZIHvzN4K+a/kVQcC6qf\r\nS35qFCquUO+4U/Yu/Whq61lpMxugWY0QxxVlSeKQLrxUAUYcBtGMwexmIUMb\r\nEgJaXZH8eb6lwyQUxDd16P2WSomgkkpr7H135YnAqkEJIt9E/vfuTB2xBeiV\r\nOokcAYDdUbkyoY/+hWilqZGT+XJks6ftSnjbSezAUzXOpSu8A3Ph19jLgjOK\r\ncydD9wf6Y8aybHCTsjqiyRc1tGGQP1zZSvEN3S1d8ED12shnvqldjZoeJ3i2\r\nWFNzQeKdLXGtCAHAaRljOuNZcl4DYtDXYq42FrOrWVL8YEbZsXqvUB8rHv6+\r\n/6XRTB1faeOL89BILcFDKAgAGmsErj3Ogpso4HtjJxGzEH7aiwT0Ybw7mwfy\r\nkLoT6lLZjFMQbYYPeGkUVWsVNqrYf2L3jU5PSVfZOa+7G39+iNwdOIrsvVmw\r\nvCspuqnBa6IaXs8SlLksOCmfSSF8GDF8L3CFJwu5e7NjGba4sSqIVI90QnWu\r\ngAKn3Z/+8drSAyRdqTsXdrh6S9yuzoFmTHyJCVvUiMQrUx41T/nPib31hg3+\r\nvWBXb3VOwbkYjG0mAcrwziBfD2PJUGcodmHAsTKYBT53ELutWVR6Dt5StYHZ\r\nMFkviiupu8lEMyD4WXI44rwIqtcmpIbfxx4=\r\n=k2/2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_0.0.0_1656806994661_0.4341350884744566","host":"s3://npm-registry-packages"}},"1.9.1-beta.24":{"name":"@flexbase/http-client-middleware","version":"1.9.1-beta.24","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.1-beta.24","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"b82c46aad183f36578865d57c794a2672262d344","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.1-beta.24.tgz","fileCount":23,"integrity":"sha512-+iKX+AdxW1W7eCIMIIZpD6RpmwvDJNbEwiOv6rtXwKigJ3yaBilFP9Ezj47vr3uv697pLd6oYvj5Z9qTIGqfwg==","signatures":[{"sig":"MEUCICmHTDhfc309gNWYJlSJtY3+3SBy+eIkVXwR8Lm5ah4TAiEAm4T1cWvnHymgWmMF79Z2sPdQFVDuI5hRWlGba5x5YRo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwOACACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/NhAAhK2JfyGg4AqDLAGJPKOHFt+7Gc1RnkU8p+zy9xAyj4ZcChC1\r\nSt46WLqumkCwS7p+bYyMaOGSWK0d/vt6MDA2SuxIOwq/X4s6o1oZOAS7YAVn\r\n7kvgN1RCKe3i8wGtEMmdg7nHZyQ2yAFKttJp5HWgteQu0V8KFc+LMyNOLjbr\r\ngOStpfaa0mS7q5Is6NBNE6e+rVXjWgXOlRbX+frvLGa0O8N//OcXAmmn5mCW\r\n+mGCHrAW3nsiijCi8HcCTIwSJ+YvPJhgEGiT22rT3lxN3U5nUbUBoPOGGCjG\r\ngm8iRDEjeEdWofYifN6nJfd+5m6iXICFz2whK0BxpVPgpGdLXYM7GKNaZm0G\r\nM+aA1aGw5ZS94m2tSffokYMUYDeUqeh7zz6gttrgppojL9fVV5itYPkSfV91\r\nKNE34ee1KshFvBNyOkJ6R/5ccOve/aRWMRTSuAj6mYu2ZfEh7iHu51Nk0ibX\r\nTgymuAS/qYdQVyPAzc2yVboxsizs9yQTePt5LU4c+1K+Vhe+XPpwrFivig+A\r\n7wudXQ7Ieak0swQGTpz2I4E6JQXOZxsFmVf0+nJ7euBmxGLcXWdauYRmSoor\r\nL3a3a79DfUsIBXydxwbf4Bx28gwWfhJbe5D2jE+Pbnq6ItU12SNMHrCrWNOc\r\nIBjwzuNoT+bkEzHeRsr8SHRzzRBKkjeW/T0=\r\n=ZRLM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.1-beta.24_1656807426746_0.6740782332158273","host":"s3://npm-registry-packages"}},"1.9.1-beta.25":{"name":"@flexbase/http-client-middleware","version":"1.9.1-beta.25","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.1-beta.25","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"b38ff6519ed2b12d5f59473cd69ba4c4da436ddf","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.1-beta.25.tgz","fileCount":23,"integrity":"sha512-Z9s3nL8/2WdaBDDm6RQRXd1KQnPAnSYkpzGINz0hbnmMKzey3MvxvxlkUhGtshOxJ3b9vIzY3JUxljDRVzfkBQ==","signatures":[{"sig":"MEUCIQC4i2EFzg9mUoGYk+V1IKlE5HA75dc9XwbxRKldrxY6JAIgXAA6bvuyxZt7lswGDOei1upjZGJSoMd8BsKiMRw5Ip4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwOD5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrLpw/+OoVvw3ABz3pJV8Tk/IFrrD+qDDzIN9CJ30vIx2A3SyTq1Flq\r\nCuj1AhMssfEkT/8Hw8To07J8wj1c8xyILoAJ3y3buQNbPr3aDv2XiD7f1kZY\r\ndL09XBe405IpRMYbM4+MsJojO3UIgZuqN57mwu/8leb80hsqv7Mss+nifUAw\r\nYFcPaBbWviR+PZkGRyZT5sO+msWPTI+cKVmQy141aFgZe/VIPM9BnrVB8Ofl\r\n4GbwPXpdxdOPzqT1wnakOhQzIOO42YWTSSPqx2mO9ZInFXfQInyhCa1Nt3nS\r\nxjmJMTcoYtQOufrCd/FnTdnku/jCDTvCz0wOkad1fFqqakOV6ku+K8VMXu5l\r\nPLLcfA1lROImXb3zbXVWuKEqYomUqfwHdMSwC9RVZRKclDXMYGomnhRJi3lx\r\nF41RChWAieceDMZWrAsNCHw3Ek6oOePabk0HE44Q/iJQxFOLJYoHY9VL5OGc\r\ndiPFvPQp6skZ4H8lyzVYkFq89Rc5PvlYKUN0xHFcb/ZzMeWsxyy+eOFIg16t\r\nfy1M9gC5cZkBUmkbwFdjirSKrXN8a3x0lyPtpSN4+T0UjQVKBk75AxwSjxFq\r\nKg/8rFNsnShz6/2GmJbt0WCeYu7ngwMCJgyyRfJ77azfUXXGnRq4LcPsYhLG\r\n1OxayTzn3VqlceEfXr6/m0vbTCwWqm2icD0=\r\n=YTDR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.1-beta.25_1656807673130_0.6270026138229625","host":"s3://npm-registry-packages"}},"1.9.2":{"name":"@flexbase/http-client-middleware","version":"1.9.2","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.2","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"cb63d86e0f0309f10332e896a19491e1a33eab2a","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.2.tgz","fileCount":23,"integrity":"sha512-S6cC+yCHD6BeoqtH1/P2XS9o4BFb82we1M2anvuK37GohtwIgww3eC62lsSFkP1uJuxe6hRAK71h8ZLwokQQdA==","signatures":[{"sig":"MEYCIQCExN8IFQkWEtDkaZzExwlRGn6XztsBtquxwJWsgg5sxgIhAMmdsBDoQ+r2bqmGi795I4+s9NVCobwxA1XPWlOV5Fij","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwOidACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOzg/+ORljO2J2GsJoVMO6cFu084zAn4fjnt6N591DU9EUipuLDcqM\r\nyCjubW/HBC6Uoa1tlytOgtJwAouu9DRv9nQ8R3u+jnYtmeSKQIl+btMgZ3Jg\r\nZvtF+4e4uKQTy8kBwq3Rnn2egC/0BrupVCvQrwoIYV2XDPpLyqrmCAVdlqbS\r\npZ7MDqH9Rix69vI8rIeq0SwedZmWVyGuZ19G7y80b9OpPGMhCeGEZSd1xRY2\r\nbAFkdqno57PgcLtrQ98gHx8OVZbh1mV7Pg7onHdJelievLcWAJLn2W2foV0U\r\niYOaK2sYbtz+Fan9pJIgqSwtiFowmwT1EJnTfE0/SAvVfnWVOFPTQIxyOjDP\r\nY9HfNqRbAcKCJ0R+aMTKV9nH/jBs2512Q0O9zkRXvq42EzWhQeUGroXeOedU\r\nmP/2R78kFLOzipOy5u7LAG0d/WTcSYCkcL2V9hLm2Ee++UvjNryqIFv+UEM3\r\ncfgMO4GNZ3iWAkb3qSmKhwbzdAyPYHemI7qlh1G1o0mzvPlaTuPE3kfyEm0q\r\nX0uW3csqAyhSHv8XG9Bd2aS2CvO0Svv5PM47pgPMLeZRFvkmaAXmqBQtDR57\r\ncf3Z9lTPsVQf8qWZ4fRTsIXJz9gPbKhFWKzgeuDRrzV1AFS/A5meBwLSyJGU\r\nfmjJQ1hwxZjw0KUUze0PUKQT3Aw1QMKWA5I=\r\n=RzY2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.2_1656809629018_0.9678049865009337","host":"s3://npm-registry-packages"}},"1.9.55":{"name":"@flexbase/http-client-middleware","version":"1.9.55","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.55","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"6cb55a3db1faaa2804f1a0f22b30b6dd2ce45b8a","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.55.tgz","fileCount":23,"integrity":"sha512-jYQ+JPb4q+aT6LkjrQRYwX2oqB/P+nUpFaNHSvi7FLE9vYHHk6xHizMvRagoGAYRg3J/fnZ9zMeAGiG6t772fQ==","signatures":[{"sig":"MEQCIFL5ygTofCj6TmFcW4l1Ml0wJ6KPFq8XWNn1WX2zMQuDAiAll73Owi/14Zf/wF+8Ol3dcNLKgNa/co5OfzwaKglJDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwOoVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpPpA//RrdhCZzuWMunvaPuTYa2H1R58fqJQtaZZJcyLfEI5rPKzhQz\r\neVONcv2WSbA5mbmup3TpnZxL9Opb+TGoFMtpdb7J3D4iBSXdrpnauUpY90cx\r\nt2EOTqwQArOP78l3aI6z/7S23pIRPX3ayfv1QD7g/pvCiUcVKJmc5epyzC15\r\njh0vE87hpi4m6YJzgAjLzWyDyOjnHLdGuPxuwQSf9ghYXiTttlDt9wzLKsir\r\ng6GcdJXql5BsuTMJQfnX30uVhTCswF1wyut0UKQFP11bGoq+dGtkCi0Jw4Ck\r\nPjXE/IIP2B9Y89BMwb+M+dkw4W9KxV80vYGxAYm/WNWRnYvK+Z3TWC5bUhuw\r\n4AcOzHCnRuFYqIirCl/lAwtDX4GnhqEynEj6q3kziUgeKCUyyhrtw1r7oEcj\r\nlDmLOQxbjZN33I3LegiD5tVZQ+xF1c4iSBLERvcMT46WQB7taDpzH1/0TbIW\r\n4GWmIWpYiCjEgC0UV6PcuTMLOvwEzevTQvqPb+6gB8F/NlOWIe1l0BHqaADC\r\n/H2iWKdhiWQf9xKVloE8kSPycCKosFugw8anF0eeHgBV4CN0K4VFsGal2ctT\r\nzJ44W4OxfLKbt3jWxkaopZc4j/LLW+IyckzDqhuernmo8fzNFXwWtw6Gu7Rt\r\nlG8NiHxtlItjdIqDmabz/Xdqt0RbLzTU0yc=\r\n=Uqen\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.55_1656810005175_0.5176242897565173","host":"s3://npm-registry-packages"}},"1.9.3":{"name":"@flexbase/http-client-middleware","version":"1.9.3","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.3","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"2174fdd516ba2640feb82577e83c43ab08f78dc6","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.3.tgz","fileCount":23,"integrity":"sha512-wfya6griWbT1zVHn2QkPwqxnipKnMMGllrizue3vN7R9YmqRAMOe7CLThg9Pwb5qeHediNr0yKC9CAksBKMuvg==","signatures":[{"sig":"MEUCIQD6JibJzH1xOUAO7ngArvOvufMEtt4VJVV36dmXDEiStgIgceDxFqBh+ZMJmdgQbbSfg4dBob48Ytm1YSalrU9g/FQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7YQ3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpw7xAAnkpx/gHF3Y5Fhi8COsSci1wRvgyftDXgjUVEk0sYcpC1Mvxp\r\npwtdDxcGt7Vou2aw73ny+AQB5nbY0y6x3+Z/Fu03APZlc/I8qKuRBHgbHisB\r\ndfhLxAnJdxMr8L7hYCfjqLTuXI86b2O57N/nBr8dxcyLhsO9+hGMsCuldrmO\r\nOLfviDnII4FvEgkzMON0hbXyHqUn4okejpwKzCtUpNzxFkXgltLYNVwqWCsX\r\nbPm5GUTjE4/43yIzyQq8P+8WYMalIIIvKVk6QV08KZmdAHxhM4pZ6stZhwbj\r\nKbzPYO3/sf4AnA/h4NKVHDAcpvXmyloiqk8LWURlH4OR/jdK1+C6eFg841/J\r\nKLSLl9YwQGKvq9ovl9vGmP3ABTkxCtlPnDh8qs1zM+X5+NvAI0aCgfNf2ob3\r\neEm+yu7fyrQIk6kdoA0GyFBQPpv8tkn2NbWjeLLSn1KBC16/wkW9Icqm5IhV\r\ncXqx7A9q0d+Id++ZbKPVG1El1Oxr2URH073dk+k1rM/eGuEIbiPvtVmPQHYQ\r\nBGPx7dmxp2xdllFLyqRcFukxIgtrUPou5Hwheycr+5urpeoRIaZp32ofZZQx\r\nH5saX4szy2jojGZOtciOiFxfdBu4/dUltqKZYpGf3Fbcf6Rw+rCBH9s1Qye0\r\nzlmGOIZgFt/oSa1hjXzL+zkFygwrqJHIrkI=\r\n=eq47\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.3_1659733047186_0.8795770873436868","host":"s3://npm-registry-packages"}},"1.9.4":{"name":"@flexbase/http-client-middleware","version":"1.9.4","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.9.4","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"5baed0a89e32d16df090db477aa7114fe2d9e11a","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.9.4.tgz","fileCount":24,"integrity":"sha512-rGYrmXeYoZeq5y5cv0OScxS55/Z9sH7xBoIzluvCDiQNCN+qqTCCKj/aeAeqZES2CnsG1tQNguwbFzYhDWhOyA==","signatures":[{"sig":"MEQCIFZkwoOMgvdMVJ9UCY3gjZS5Yd45ghh/EmU9SH/g+17RAiBaEOXx8EbXViHypZJxDYxCbnTEl2DX4zittraYpsG0Zw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35754,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+lmhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmosLhAAoXOGl4kFeeZ0fufOFiBVs13/iQIUPBXA4C2uuQPs29QZuUOY\r\nygZ+8EWd1sEpd3vmb8VgA86yUTSHbaUdt2a4D6NzKLs0jpD+Zk86vMkAqRpx\r\nixA/7zTtjkl/IMwRILvjk/Qw+LZGb3+ibMnJ/TxBY8oawZgQLrQ3UaX/5LGy\r\n7FBy5xspiSRTA+NNdJgr0LDqSgqdopPO/zViyyeqK3qq9HrJihMU13eZoKRD\r\n+kYuGUtQ41qAuuVtofsPyxLAaaE9+hAhmDkUqyYKMkoTR4TNGO4tPmYC/Vsr\r\nQSqENcTwT+m7cLtuOWKqcpnLjfYKpV6SLI66birJNyvaYFCAGxarFp2gAorE\r\nrTp8WmM6/em5bujvxJ0J3TOKg0QbQIYGc7z34cTi17OjQVdRew1A3zwYQaID\r\nzoLZoeyk6oemyldP21kTVz+5OoxkPwOoRheljuemF2MwiIYjp3kVH1DKy6JZ\r\nkT2yc5XoBA4UklyngCNPEH+1bjODvb2bIiiuCBTQ/lRy0rcifsf2it+H8WNt\r\nRL2SOL25WYCeX9g3VBW8f4blMHjBHQT3deZIxD61yBNI2nTfxLIA4gQLW4nP\r\nvCvNEMA8x7Q6Xc/kTviTSWXnrgkkUILvuPzW6/wZ6aH8P9B+QRmIyEBz8a5+\r\nsGcJMhdJiEJ2PKlUTRR14Q6R5ppeld8K9gI=\r\n=I7VU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^2.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.9.4_1660574113229_0.3404554259364083","host":"s3://npm-registry-packages"}},"1.10.0-beta.1":{"name":"@flexbase/http-client-middleware","version":"1.10.0-beta.1","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@1.10.0-beta.1","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"6ae82a44c7b118dc104b74dff1f4bca2bb8b8fdc","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-1.10.0-beta.1.tgz","fileCount":22,"integrity":"sha512-Qi+sgfLKP4xKo6gct78HChv2PR02hhsC+xBvYVeRxf6vPQRa4gymxhPi+kVVoyx2ad/6RfhUcAY32dlbupE8Jg==","signatures":[{"sig":"MEQCIFZPGuPHB/SnNhXNThMbHSBHhLoZc+A4Xqyephr9P56/AiBsTRkJ1XUUPO07Ub/cxfHDKAWyLsxFLsqLCSabe1vGdA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17557},"main":"./dist/index.js","type":"module","readme":"[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n# http-client-middleware\n\nThis is a middleware package to ease http authentication.\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","exports":"./dist/index.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_1.10.0-beta.1_1683556381691_0.5726830109048293","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@flexbase/http-client-middleware","version":"2.0.0","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@2.0.0","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"fba8fea8eb982960cae835f034894dff8d04a34c","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-2.0.0.tgz","fileCount":22,"integrity":"sha512-Jw5JFnZcVRIyjovG9ZucDmMoY9i5CsmMyQ5MCpwjcCOiR4XsVjttQ7W2uQWNGfE0OApBSPhs18QBDVZfcm/6wg==","signatures":[{"sig":"MEMCHzQlXzQ2Q8xKIvEajBr2VOBWYa6TPRAbZCpUSnzLHcUCIFLADzEY96ZiKg8OOPOvjwsurA2jVQbtjQcwIPdiRz4l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17535},"main":"./dist/index.js","type":"module","exports":"./dist/index.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^3.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_2.0.0_1683557172768_0.5351548370403822","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@flexbase/http-client-middleware","version":"2.0.1","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@2.0.1","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"f3fb2a7a50552775f94e1e9548074a6a2b21a353","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-2.0.1.tgz","fileCount":22,"integrity":"sha512-if8cbJUR5tT912Fq2yWxqCoFT0LJ8UYjhBG7eKrreOLPfGnjmOf07sbsQoAO/XQS8PE0NRK0/pKpFWC3ah871g==","signatures":[{"sig":"MEQCIGCqueoEALfvKyT7eMQAYfxVwwxR6dBZqBh1n3C+m68QAiAexRG1RzOxOUtMWQgVsVarZe4Iswg4gsCqol5wS/DULA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17535},"main":"./dist/index.js","type":"module","exports":"./dist/index.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^3.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_2.0.1_1683560750780_0.46033230489237","host":"s3://npm-registry-packages"}},"2.0.2":{"name":"@flexbase/http-client-middleware","version":"2.0.2","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@2.0.2","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"801cfe7f6f7f8650f4e74f116798a96e4e5591a2","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-2.0.2.tgz","fileCount":22,"integrity":"sha512-7LSO0YCawebWQzZ/CzNigFxDM3i+9zztyJiyKXglJl+gErqZ7BBNjSaEmjBm7dSWXHI3lTHMTe5padfcAnhqBw==","signatures":[{"sig":"MEUCIQCVx9v3YLi0B+Oylydtyc7yQ8r7ATdZii91yD34xkIs9gIgVejfT5J5vP4q6YGRy669z9N8ow0aKTiKx5NYhL1JVXw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17562},"main":"./dist/index.js","type":"module","exports":"./dist/index.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^3.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_2.0.2_1696281748309_0.14506093828295485","host":"s3://npm-registry-packages"}},"2.0.3-beta.12":{"name":"@flexbase/http-client-middleware","version":"2.0.3-beta.12","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@2.0.3-beta.12","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"beac1c962033a1fa0948dab0eede0e0e85be9238","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-2.0.3-beta.12.tgz","fileCount":22,"integrity":"sha512-CbLXJviem//zP0Y88h+3/xbyOR1/dQm5Eb3uJAnTRTwoqfLmTCtf89YfBRHecxqE9l1GylFRE4nUfsvzoabB9A==","signatures":[{"sig":"MEYCIQDldSpZBlLLV36ym5xEE+eIENMkUeAlNxeKocnKZYf5/wIhAIQf62dp4I+0lDrPgaqzTHstCAbI/KlUQXPY4aywOZkf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17771},"main":"./dist/index.js","type":"module","readme":"[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n# http-client-middleware\n\nThis is a middleware package to wrap http authentication.\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","exports":"./dist/index.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_2.0.3-beta.12_1697568663401_0.3273459586196181","host":"s3://npm-registry-packages"}},"2.0.3":{"name":"@flexbase/http-client-middleware","version":"2.0.3","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@2.0.3","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"370b495fb3400b458ea6560b5cf719ba51bb6fd0","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-2.0.3.tgz","fileCount":22,"integrity":"sha512-aRny9rUXqGM0lM0MKBpRT5yGh5p5Tz+WuCr9wpT5Ht+mJW74E/F+mUcxMPfyczkSJ7DUaHJ/s0Y8rQepm4h2Hg==","signatures":[{"sig":"MEUCIEyDyiG0Gxs0PrnplYJ5030ja4oD4VTDmfx5beDeNXOMAiEA/nOrSSVm8/fK0q/wPKLO8M/pScXpFqIiHehTaIEzv0M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17749},"main":"./dist/index.js","type":"module","exports":"./dist/index.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^3.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_2.0.3_1697569217502_0.9115821217699058","host":"s3://npm-registry-packages"}},"2.0.12":{"name":"@flexbase/http-client-middleware","version":"2.0.12","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@2.0.12","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"39ca139b23cc82eb93dbe8072e213663be5aad83","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-2.0.12.tgz","fileCount":22,"integrity":"sha512-36aeiYsznfPY7g2g0YX4KJWn94WiLJzhM/rslsnbmqtePpfeZ/wIK+AbLcz8M2ZdQKsiJ4LcefV2D9YZVCbjDw==","signatures":[{"sig":"MEQCIClNMGwo+9t8LaCy/MkHaRV52a8Ec25Ci5EVS1nEevjCAiBF/O+7Zae27//8mlB0QYYD0F6yriJleMOoa8Qm0szilg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17711},"main":"./dist/index.js","type":"module","exports":"./dist/index.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^3.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_2.0.12_1697982627727_0.7067829007147395","host":"s3://npm-registry-packages"}},"2.0.13":{"name":"@flexbase/http-client-middleware","version":"2.0.13","keywords":["flexbase"],"author":{"name":"Flexbase"},"license":"MIT","_id":"@flexbase/http-client-middleware@2.0.13","maintainers":[{"name":"chris.fowlkes","email":"chris.fowlkes@flexbase.app"},{"name":"drbobbeaty","email":"drbob@TheManFromSPUD.com"},{"name":"peilong-du","email":"peilong.du@flexbase.app"},{"name":"knoxcoder","email":"knoxcoder@gmail.com"}],"homepage":"https://github.com/flexbase-eng/http-client-middleware","bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"dist":{"shasum":"b36129d7395cb944ed00526078bf0ef1be20e474","tarball":"https://registry.npmjs.org/@flexbase/http-client-middleware/-/http-client-middleware-2.0.13.tgz","fileCount":22,"integrity":"sha512-YD//F/phtKEHxoMXUAheNBbWHneHKIRCPOwhdQEse0ohgoe7WuZ3hiH/HGbu2Ds/xFB63jfhmH9TtlEWzO62Zg==","signatures":[{"sig":"MEUCIDD0zQVSIXsxeRpI/rf8J4Ga8dne5lFCxnS/htAhKADEAiEAzhr3zfq+uSKV1UBiTjEfDrOfRP5DanpGJCF18smB9lk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17841},"main":"./dist/index.js","type":"module","exports":"./dist/index.js","_npmUser":{"name":"knoxcoder","email":"knoxcoder@gmail.com"},"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Flexbase\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"luxon":"^3.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-client-middleware_2.0.13_1698075948175_0.6934131927794855","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-06-19T14:53:18.875Z","modified":"2025-08-10T12:20:14.802Z","0.1.40":"2022-06-19T14:53:19.116Z","0.1.41":"2022-06-19T15:03:35.288Z","0.1.0":"2022-06-19T15:08:31.907Z","1.0.0":"2022-06-19T18:06:11.945Z","1.1.0":"2022-06-19T18:59:41.905Z","1.2.0":"2022-06-19T19:06:38.137Z","1.3.0":"2022-06-20T12:57:41.987Z","1.3.42":"2022-06-20T13:33:59.493Z","1.4.43":"2022-06-20T13:37:13.684Z","1.4.0":"2022-06-20T13:40:09.181Z","1.4.44":"2022-06-22T09:55:36.035Z","1.4.46":"2022-06-22T14:19:44.016Z","1.5.0":"2022-06-23T14:50:41.897Z","1.6.0":"2022-06-23T17:36:09.284Z","1.7.0":"2022-06-24T18:07:48.980Z","1.8.0":"2022-06-24T20:20:14.516Z","1.9.0":"2022-06-25T14:19:41.603Z","1.9.47":"2022-06-27T17:05:55.895Z","1.9.48":"2022-06-27T17:08:06.918Z","1.9.49":"2022-07-01T18:50:08.706Z","1.9.50":"2022-07-01T19:10:45.978Z","1.9.1":"2022-07-02T15:01:32.226Z","1.9.1-beta.8":"2022-07-02T17:19:21.288Z","0.0.0":"2022-07-03T00:09:54.840Z","1.9.1-beta.24":"2022-07-03T00:17:06.900Z","1.9.1-beta.25":"2022-07-03T00:21:13.334Z","1.9.2":"2022-07-03T00:53:49.208Z","1.9.55":"2022-07-03T01:00:05.379Z","1.9.3":"2022-08-05T20:57:27.384Z","1.9.4":"2022-08-15T14:35:13.393Z","1.10.0-beta.1":"2023-05-08T14:33:01.869Z","2.0.0":"2023-05-08T14:46:12.919Z","2.0.1":"2023-05-08T15:45:50.940Z","2.0.2":"2023-10-02T21:22:28.579Z","2.0.3-beta.12":"2023-10-17T18:51:03.625Z","2.0.3":"2023-10-17T19:00:17.674Z","2.0.12":"2023-10-22T13:50:27.951Z","2.0.13":"2023-10-23T15:45:48.355Z"},"bugs":{"url":"https://github.com/flexbase-eng/http-client-middleware/issues"},"author":{"name":"Flexbase"},"license":"MIT","homepage":"https://github.com/flexbase-eng/http-client-middleware","keywords":["flexbase"],"repository":{"url":"git@github.com:flexbase-eng/http-client-middleware.git","type":"git"},"description":"Http client middleware","maintainers":[{"email":"knoxcoder@gmail.com","name":"knoxcoder"},{"email":"peilong.du@flexbase.app","name":"peilong-du"},{"email":"chris.fowlkes@flexbase.app","name":"chris.fowlkes"}],"readme":"[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_http-client-middleware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_http-client-middleware)\n\n# http-client-middleware\n\nThis is a middleware package to wrap http authentication.\n\n## Usage\n\nUsing [wretch](https://github.com/elbywan/wretch)\n\n### Client Credentials\n\n```typescript\nconst clientCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n  clientId: \"myclient id\",\n  clientSecret: \"super secret\"\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => clientCredentials,\n    tokenAccessor: new ClientCredentialsAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n\n### Password Credentials\n\n```typescript\n// for password creds we only need to supply the urls as user/pass will come from a login form\nconst passwordCredentials = {\n  tokenUrl: \"https://some.url/auth/token\",\n  refreshTokenUrl: \"https://some.url/auth/refresh\",\n};\n\nclass SimpleAuthenticationTokenStore implements AuthenticationTokenStore {\n    private _authenticationToken: AuthenticationToken | null = null;\n\n    retrieveToken(): IAuthenticationToken | null {\n        return this._authenticationToken;\n    }\n\n    storeToken(token: IAuthenticationToken | null): void {\n        this._authenticationToken = token;\n    }\n}\n\nconst authMiddleware = authenticationTokenMiddleware({\n    credentialProvider: () => passwordCredentials,\n    tokenAccessor: new PasswordAuthenticationTokenAccessor(),\n    tokenStore: new SimpleAuthenticationTokenStore()\n});\n\nwretch(...).middlewares([authMiddleware]);\n```\n","readmeFilename":"README.md"}