{"_id":"@approov/ionic-native-http-connection-backend","_rev":"2-d8dec3312db370e9e31a1e5682dedfe0","name":"@approov/ionic-native-http-connection-backend","dist-tags":{"latest":"10.0.1"},"versions":{"10.0.0":{"name":"@approov/ionic-native-http-connection-backend","version":"10.0.0","description":"Allows the Approov advanced http plugin to be used with Ionic angular Http and HttpClient requests","main":"dist/index.js","typings":"dist/index.d.ts","scripts":{"ngcc":"ngcc --properties es2015 browser module main --async false","build":"npx rimraf aot dist && npm run ngcc && ngc","commit":"git-cz","semantic-release":"semantic-release","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/approov/ionic-native-http-connection-backend.git"},"keywords":["ionic","ionic3","approov","tls pinning"],"author":{"name":"Dmytro Snisarenko"},"license":"MIT","bugs":{"url":"https://github.com/approov/ionic-native-http-connection-backend/issues"},"homepage":"https://github.com/approov/ionic-native-http-connection-backend#readme","devDependencies":{"@angular/common":"^12.0.1","@angular/compiler":"^12.0.1","@angular/compiler-cli":"^12.0.1","@angular/core":"^12.0.1","@angular/forms":"^12.0.1","@angular/platform-browser":"^12.0.1","@angular/router":"^12.0.1","@awesome-cordova-plugins/core":"^5.37.3","@commitlint/cli":"^12.1.4","@commitlint/config-conventional":"^12.1.4","@ionic/angular":"^5.6.7","@ionic/core":"^5.6.7","@semantic-release/git":"^9.0.0","@types/jest":"^26.0.23","babel-jest":"^26.6.3","commitizen":"^4.2.4","core-js":"^3.12.1","cz-conventional-changelog":"^3.3.0","husky":"^6.0.0","jest":"^26.6.3","jest-config":"^26.6.3","lint-staged":"^11.0.0","prettier":"^2.3.0","rimraf":"^3.0.2","rxjs":"^7.1.0","semantic-release":"^19.0.3","ts-jest":"^26.5.6","typescript":"~4.2.4","zone.js":"^0.11.4"},"peerDependencies":{"@angular/core":">=12.0.1"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"jest":{"transform":{"^.+\\.(ts|js|html)$":"ts-jest"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|js)$","moduleFileExtensions":["ts","js","html","json"],"globals":{"ts-jest":{"tsconfig":"tsconfig.test.json","diagnostics":true}},"setupFilesAfterEnv":["<rootDir>/jest.init.ts"],"transformIgnorePatterns":["node_modules/(?!@ionic)"]},"husky":{"hooks":{"pre-commit":"lint-staged","commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"lint-staged":{"src/**/*.ts":["prettier --write"]},"publishConfig":{"tag":"latest"},"release":{"branches":"master","prepare":["@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"dependencies":{"@awesome-cordova-plugins/approov-advanced-http":"^5.44.0"},"gitHead":"1b8f2d6175e4100d15fee07dd4aa3af5238c601a","_id":"@approov/ionic-native-http-connection-backend@10.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-NpUe0IsDIxZD2jaWHjNH1SZEsbSijzM0myakg5t7EvRPCteubu+2/RpNR8sR3WyeKvbxJ9jWtvxkPvnVJ7NYlw==","shasum":"5ac4e4da29df6c25dc9a8f5bbbae6fc000e6c8aa","tarball":"https://registry.npmjs.org/@approov/ionic-native-http-connection-backend/-/ionic-native-http-connection-backend-10.0.0.tgz","fileCount":9,"unpackedSize":15465,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDxv+KefBXhhe7Kxhf6Ej0gnvwbjhErzyto2kwJBUNkuAiAVuBWKPM3rRmvBXNfqvfV7UVXMwtJU3NlZJWY+d6IfCQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixIKZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqSAw//SLPn/s9RVOzWIpr+xXZefvzJ1wpxIZyQBM5tHNycp7WhyDEm\r\nWT7Hbr48GziisRmkMJGJb4kJt2AaYBRL0GZAGEnLJKk0qEPMx3lIw2dM8Qiy\r\nkKUs6HXhM4a6SQeS+icGmv/uzg5KbQ6/kYhCTsA5pwaaAapdy1oAynZ0L7G9\r\n3cAtqYX3Mx9fzvR9TA/0jPIrYRPlnX5VrBhdvw96RKPAwhA5kUmtBclEtr0o\r\nK9Ac1xUEKxGyemkfwagpeaKXHrZvcaN+bXW+pFYLWtJRUjn0GACY5TJ3Ygvj\r\ng5f6NE3AKxruRJ6EwwExo9mfCM/Dgs82zD1r7DsjygkuFvYQVwyzrKB3K+qQ\r\nTz103pb7X2HaI3cLW0nscygzrsuKm9tGr+smB3AtE404a/Yt5Rurp7pXm2uk\r\nPW3c9uaaE82L5a5sLtI32jrJyNy8AVPtK6BDV0nJoW9OGZgT7H18lHk2tFCs\r\nL6qEufyf3s7AOu6/Gu3lB219eKr/+Xpio5B0HOXKoSfyrh1/7kE+Dcitb+1m\r\n/MqBHcbgkMwllNvx0ZeHstsZ09/lKI1VI7xAsXWfqGjdE8RwwUfiypBDX3rs\r\nonj/u1MP46OlAbFdzXTzzaTqdYpag7+keA79jmb3u7mQjzPzy2ZIYNVN7l2o\r\n6GpMU2q0xLvqEE3Rnj2/JnKV9YfkOr8Izik=\r\n=tgyz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"richardmtaylor","email":"richardt@criticalblue.com"},"directories":{},"maintainers":[{"name":"johannesschneiders","email":"johanness@criticalblue.com"},{"name":"skiph","email":"skiph@criticalblue.com"},{"name":"jexh","email":"jexh@criticalblue.com"},{"name":"paulos.approov","email":"paulos@criticalblue.com"},{"name":"richardmtaylor","email":"richardt@criticalblue.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ionic-native-http-connection-backend_10.0.0_1657045657520_0.1332866173685614"},"_hasShrinkwrap":false},"10.0.1":{"name":"@approov/ionic-native-http-connection-backend","version":"10.0.1","description":"Allows the Approov advanced http plugin to be used with Ionic angular Http and HttpClient requests","main":"dist/index.js","typings":"dist/index.d.ts","scripts":{"ngcc":"ngcc --properties es2015 browser module main --async false","build":"npx rimraf aot dist && npm run ngcc && ngc","commit":"git-cz","semantic-release":"semantic-release","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/approov/ionic-native-http-connection-backend.git"},"keywords":["ionic","ionic3","approov","tls pinning"],"author":{"name":"Dmytro Snisarenko"},"license":"MIT","bugs":{"url":"https://github.com/approov/ionic-native-http-connection-backend/issues"},"homepage":"https://github.com/approov/ionic-native-http-connection-backend#readme","devDependencies":{"@angular/common":"^12.0.1","@angular/compiler":"^12.0.1","@angular/compiler-cli":"^12.0.1","@angular/core":"^12.0.1","@angular/forms":"^12.0.1","@angular/platform-browser":"^12.0.1","@angular/router":"^12.0.1","@awesome-cordova-plugins/core":"^5.37.3","@commitlint/cli":"^12.1.4","@commitlint/config-conventional":"^12.1.4","@ionic/angular":"^5.6.7","@ionic/core":"^5.6.7","@semantic-release/git":"^9.0.0","@types/jest":"^26.0.23","babel-jest":"^26.6.3","commitizen":"^4.2.4","core-js":"^3.12.1","cz-conventional-changelog":"^3.3.0","husky":"^6.0.0","jest":"^26.6.3","jest-config":"^26.6.3","lint-staged":"^11.0.0","prettier":"^2.3.0","rimraf":"^3.0.2","rxjs":"^7.1.0","semantic-release":"^19.0.3","ts-jest":"^26.5.6","typescript":"~4.2.4","zone.js":"^0.11.4"},"peerDependencies":{"@angular/core":">=12.0.1"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"jest":{"transform":{"^.+\\.(ts|js|html)$":"ts-jest"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|js)$","moduleFileExtensions":["ts","js","html","json"],"globals":{"ts-jest":{"tsconfig":"tsconfig.test.json","diagnostics":true}},"setupFilesAfterEnv":["<rootDir>/jest.init.ts"],"transformIgnorePatterns":["node_modules/(?!@ionic)"]},"husky":{"hooks":{"pre-commit":"lint-staged","commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"lint-staged":{"src/**/*.ts":["prettier --write"]},"publishConfig":{"tag":"latest"},"release":{"branches":"master","prepare":["@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"dependencies":{"@awesome-cordova-plugins/approov-advanced-http":"^5.44.0"},"gitHead":"a974f418250824009efcb4cb5bdb9d87738d8764","_id":"@approov/ionic-native-http-connection-backend@10.0.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-xV03uZqzSZOEbZn54oFyGGg907GaPmSuwld8eKcuApKlx2jq3oBoaK18Q/Aj9VarYVMze7yZzhMcV1KHLc0/Gw==","shasum":"2d0eacef0a63341d53353971dfbc37b574f39051","tarball":"https://registry.npmjs.org/@approov/ionic-native-http-connection-backend/-/ionic-native-http-connection-backend-10.0.1.tgz","fileCount":56,"unpackedSize":41131,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHQ7X+fO3QJ3p27Tp/d1U7G20JFAMmxQ3NoUlxhnhTHpAiAEugHpyuK2kQ0ld13u2pCyDmEuudlvtRHe5jfFiAAZsQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixXoXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqzdA/+NUe7z0gQe7AamDGvRx+wrpXbez13mT4iy84yCMsW5zqkpi3J\r\nwxoP14gi09qlhKtJYZSuyICWvWfhH9hLJQbWtw4R0yJK1ct79COZ7R5M8dIy\r\nbOceLoRif49vijgEd7pySWl+BG1dBYUSXFEXDkIz4ySPyqM9OdOTt/MNftH+\r\n0tEUbpaBMtE66F6QkKN4Wny/etbfwpj7kUw/Spj3S5+E/1Iypj695sduJkWd\r\nNWxkfhpKa/VXC2benqya/9Y9GtYkjrG5bZM4/uDD/bfnxI77e8lETdby6gtC\r\nac+ORwdYSCoD19HITU9u/Qdj4WKZEJ2FjE2daDgxf0bG346Bg+evsYiBhJ0Z\r\n68ado1PmpNVfjx3WVG3baScmokwR1T+jyph5t+UrefdjgMn84MqpJT84eTMD\r\npO0m4BM9O5BXcCQPmtnW83Q0lQoXzToO9HdR37fJJj7UALeueJvJrf5aSVDZ\r\n8T3GNKM7BXNNbuguNyv4KopynoiirqQLcGduTpFfNRQXPcn5NE1h74DN50L5\r\nwA3f+4yqd3Uu61DJUKStJ9oRmil+jrdM59vLzSs7vJI45VeAobcYYxX+qXxP\r\n+qwqGrpKmdMrbDD+L+MfxKn7qxS9iBkOTeJD1/ILHwtsHuQ+q1v2s3Mtrskh\r\nVSVGFk2+GGMuFOGub+/OqCmypBIbd+1UoY0=\r\n=IhAO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"richardmtaylor","email":"richardt@criticalblue.com"},"directories":{},"maintainers":[{"name":"johannesschneiders","email":"johanness@criticalblue.com"},{"name":"skiph","email":"skiph@criticalblue.com"},{"name":"jexh","email":"jexh@criticalblue.com"},{"name":"paulos.approov","email":"paulos@criticalblue.com"},{"name":"richardmtaylor","email":"richardt@criticalblue.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ionic-native-http-connection-backend_10.0.1_1657109015232_0.8648416395829377"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-05T18:27:37.444Z","10.0.0":"2022-07-05T18:27:37.797Z","modified":"2023-05-16T11:03:39.175Z","10.0.1":"2022-07-06T12:03:35.433Z"},"maintainers":[{"email":"ivo.liondov@approov.io","name":"ivo.liondov"},{"email":"johanness@criticalblue.com","name":"johannesschneiders"},{"email":"skiph@criticalblue.com","name":"skiph"},{"email":"jexh@criticalblue.com","name":"jexh"},{"email":"paulos@criticalblue.com","name":"paulos.approov"},{"email":"richardt@criticalblue.com","name":"richardmtaylor"}],"description":"Allows the Approov advanced http plugin to be used with Ionic angular Http and HttpClient requests","homepage":"https://github.com/approov/ionic-native-http-connection-backend#readme","keywords":["ionic","ionic3","approov","tls pinning"],"repository":{"type":"git","url":"git+https://github.com/approov/ionic-native-http-connection-backend.git"},"author":{"name":"Dmytro Snisarenko"},"bugs":{"url":"https://github.com/approov/ionic-native-http-connection-backend/issues"},"license":"MIT","readme":"# ionic-native-http-connection-backend\n\n[![version](https://img.shields.io/npm/v/ionic-native-http-connection-backend.svg?style=flat-square)](http://npm.im/ionic-native-http-connection-backend)\n[![MIT License](https://img.shields.io/npm/l/component-library.svg?style=flat-square)](http://opensource.org/licenses/MIT)\n\nThis library adds [`@awesome-cordova-plugins/approov-advanced-http`](https://www.npmjs.com/package/@approov/cordova-plugin-advanced-http) (when available) as a connection backend to Angular's `Http` and `HttpClient`.\n\nThis is a fork of project original developed for a different reason, see [CORS Motivation](#cors-motivation). It is being used to intercept Angular requests so they can use the Advanced Http Plugin that has been updated to provide Approov protection.\n\n## CORS Motivation\n\nNow that Apple promotes/requires the use of `WKWebView` instead of the deprecated `UIWebView`, Ionic has switched newly created apps over via their [`cordova-plugin-ionic-webview`](https://github.com/ionic-team/cordova-plugin-ionic-webview) \n(and Cordova offers it via their [`cordova-plugin-wkwebview-engine`](https://github.com/apache/cordova-plugin-wkwebview-engine)). That causes requests that used to work just fine to fail with [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) errors.\n\nThe real solution of course is to fix the CORS issues server side - but this may not be possible with e.g. 3rd party APIs.\n\nEven though there is a way to solve CORS issues without changing server's response header by using [`@awesome-cordova-plugins/http`](https://ionicframework.com/docs/native/http/), this only works on device and doesn't provide all the power of Angular's `Http` and `HttpClient`.\n\n## How it works\n\n- The library provides a `HttpBackend` interface for Angular's `HttpClient`\n- This `HttpBackend` interface tries to use `@awesome-cordova-plugins/approov-advanced-http` whenever it is possible (= on device with installed plugin)\n- If `HttpBackend` finds it impossible to use `@awesome-cordova-plugins/approov-advanced-http`, it falls back to standard Angular code (`HttpXhrBackend`, which uses `XmlHttpRequest`)\n\nThis strategy allows developers to use Angular's `HttpClient` transparently in both environments: Browser and Device.\n\n## Installation\n\n```bash\nnpm install --save ionic-native-http-connection-backend\n```\n\nThen follow instructions at https://ionicframework.com/docs/native/http/#installation\n\n## Usage\n\nAdd `NativeHttpModule`, `NativeHttpBackend` and `NativeHttpFallback` into the application's module\n\n```typescript\nimport { NgModule } from '@angular/core';\nimport { HttpBackend, HttpXhrBackend } from '@angular/common/http';\nimport { NativeHttpModule, NativeHttpBackend, NativeHttpFallback } from '@approov/ionic-native-http-connection-backend';\nimport { Platform } from '@ionic/angular';\n\n@NgModule({\n    declarations: [],\n    imports: [\n        NativeHttpModule\n    ],\n    bootstrap: [],\n    entryComponents: [],\n    providers: [\n        {provide: HttpBackend, useClass: NativeHttpFallback, deps: [Platform, NativeHttpBackend, HttpXhrBackend]},\n    ],\n})\nexport class AppModule {\n}\n```\n\n## Contributing\n\nContributing guidelines could be found in [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Troubleshooting\n\n[TROUBLESHOOTING.md](TROUBLESHOOTING.md)\n","readmeFilename":"README.md"}