{ "info": { "author": "Andras Barthazi", "author_email": "andras@barthazi.hu", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Environment :: Plugins", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Utilities" ], "description": "httpie-ems-auth\n===============\n\nThis `HTTPie `_ auth plugin implements Escher authentication\nfor Emarsys API requests.\n\nInstallation\n------------\n\nBe sure that `HTTPie `_ is installed, and install this plugin:\n\n.. code-block:: bash\n\n $ pip install httpie-ems-auth\n\nAfter installing, you will see the option ``ems-auth`` under ``--auth-type`` if you run\n``$ http --help``.\n\nExample\n-------\n\nSuiteable if you call the API of Suite\n\n.. code-block:: bash\n\n $ http --auth-type=ems-auth --auth=escher_key:escher_secret https://api.emarsys.net/api/v2/internal/12345678/settings\n\nThe default Escher credential scope is \"eu/suite/ems_request\" which identifies Suite.\nIf u are calling another service, you have to alter the credential scope like this:\n\n.. code-block:: bash\n\n $ http --auth-type=ems-auth --auth=eu/suite/ems_request/escher_key:escher_secret https://api.emarsys.net/api/v2/internal/12345678/settings\n\nCheck out `HTTPie sessions `_ if you would like to\nsave authentication information between your requests.\n\nIf you want to use in python code this example can help:\n .. code-block:: python\n \n import escherauth\n import datetime\n from urlparse import urlparse\n import requests\n \n escher_key = 'test'\n escher_secret = 'test'\n options = {\n 'algo_prefix': 'EMS',\n 'vendor_key': 'EMS',\n 'hash_algo': 'SHA256',\n 'auth_header_name': 'X-Ems-Auth',\n 'date_header_name': 'X-Ems-Date'\n }\n \n credential_scope = \"test\"\n \n if \"/\" in escher_key:\n scope = escher_key.split(\"/\")\n escher_key = scope.pop()\n credential_scope = \"/\".join(scope)\n \n client = {'api_key': escher_key, 'api_secret': escher_secret}\n escher = escherauth.Escher(credential_scope, options)\n \n url = 'http://test-escher-url.com/api/call/smth'\n \n r = requests.PreparedRequest()\n r.prepare('GET',url)\n now = datetime.datetime.utcnow()\n r.headers['X-Ems-Date'] = now.strftime('%Y%m%dT%H%M%SZ')\n parsed_uri = urlparse(r.url)\n r.headers['Host'] = parsed_uri.netloc\n \n f = escher.sign(r, client)\n s = requests.Session()\n \n s.send(f)\n \n ..", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/emartech/httpie-ems-auth", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/emartech/httpie-ems-auth", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "httpie-ems-auth-p3", "package_url": "https://pypi.org/project/httpie-ems-auth-p3/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/httpie-ems-auth-p3/", "project_urls": { "Download": "https://github.com/emartech/httpie-ems-auth", "Homepage": "https://github.com/emartech/httpie-ems-auth" }, "release_url": "https://pypi.org/project/httpie-ems-auth-p3/0.2.3/", "requires_dist": null, "requires_python": null, "summary": "EmsAuth plugin for HTTPie.", "version": "0.2.3" }, "last_serial": 2453643, "releases": { "0.2.2": [ { "comment_text": "", "digests": { "md5": "58565826fd5be2062937eba6e0905176", "sha256": "5abb8f563216ff098a7f7029a339bad0e463e47fedd3b2bc678a2e82459733fc" }, "downloads": -1, "filename": "httpie_ems_auth_p3-0.2.2-py2.7.egg", "has_sig": false, "md5_digest": "58565826fd5be2062937eba6e0905176", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4594, "upload_time": "2016-11-10T18:38:32", "url": "https://files.pythonhosted.org/packages/64/ea/d94e93becd6a3675d415748c121ab43c9a7776cf43daab91f0d5c6517c79/httpie_ems_auth_p3-0.2.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "eb4aec9cdb63614f17b77c7849dd1b89", "sha256": "47ecfced70c8a589d4937caf2a4ab9a3b650b31fd180f151db93050e21c596fa" }, "downloads": -1, "filename": "httpie-ems-auth-p3-0.2.2.tar.gz", "has_sig": false, "md5_digest": "eb4aec9cdb63614f17b77c7849dd1b89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2875, "upload_time": "2016-11-10T18:38:29", "url": "https://files.pythonhosted.org/packages/1e/27/305d5bd7a7412e23430e3783fafcd0d31830a6a494f635e3688b3b41b1b5/httpie-ems-auth-p3-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "d0afd0ebb63ae18212bff1853e083cc1", "sha256": "aa6015fb7a9cad7e588eaed6f04946b7f6d6eb34c109e4208266f195329723de" }, "downloads": -1, "filename": "httpie_ems_auth_p3-0.2.3-py2.7.egg", "has_sig": false, "md5_digest": "d0afd0ebb63ae18212bff1853e083cc1", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4607, "upload_time": "2016-11-10T18:40:25", "url": "https://files.pythonhosted.org/packages/ae/8c/bdfe097c6d3d5029d3459152963b435c90855e00cd1035f234089aa1a269/httpie_ems_auth_p3-0.2.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "179dc1c21ded161938ff63a031d506df", "sha256": "52bd36adeeaf7df11fdfe4f24df4b14e4063a74f544cc2efcf891b8c90ea67e7" }, "downloads": -1, "filename": "httpie-ems-auth-p3-0.2.3.tar.gz", "has_sig": false, "md5_digest": "179dc1c21ded161938ff63a031d506df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2883, "upload_time": "2016-11-10T18:40:22", "url": "https://files.pythonhosted.org/packages/44/ad/fc5be78495f455b44c9b0ee8a50e8ddbb3ea5bbdf41ffc35b1a8c9da0fea/httpie-ems-auth-p3-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d0afd0ebb63ae18212bff1853e083cc1", "sha256": "aa6015fb7a9cad7e588eaed6f04946b7f6d6eb34c109e4208266f195329723de" }, "downloads": -1, "filename": "httpie_ems_auth_p3-0.2.3-py2.7.egg", "has_sig": false, "md5_digest": "d0afd0ebb63ae18212bff1853e083cc1", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4607, "upload_time": "2016-11-10T18:40:25", "url": "https://files.pythonhosted.org/packages/ae/8c/bdfe097c6d3d5029d3459152963b435c90855e00cd1035f234089aa1a269/httpie_ems_auth_p3-0.2.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "179dc1c21ded161938ff63a031d506df", "sha256": "52bd36adeeaf7df11fdfe4f24df4b14e4063a74f544cc2efcf891b8c90ea67e7" }, "downloads": -1, "filename": "httpie-ems-auth-p3-0.2.3.tar.gz", "has_sig": false, "md5_digest": "179dc1c21ded161938ff63a031d506df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2883, "upload_time": "2016-11-10T18:40:22", "url": "https://files.pythonhosted.org/packages/44/ad/fc5be78495f455b44c9b0ee8a50e8ddbb3ea5bbdf41ffc35b1a8c9da0fea/httpie-ems-auth-p3-0.2.3.tar.gz" } ] }