{ "info": { "author": "Adarsh Krishnan", "author_email": "adarshk7@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "[![Build Status](https://api.travis-ci.org/adarshk7/tupas_verisigner.png)](https://api.travis-ci.org/adarshk7/tupas_verisigner)\n\n# TUPAS Verisigner\n\n## Introduction\n\nThis package can be used to:\n\n* Receive a TUPAS request URL and parse it.\n* Calculate the signature using a shared input secret and query params.\n* Compare it to the signature in the URL.\n* And, generate a response URL with new signature based on an shared output secret.\n\n\n## Usage\n\n```\nfrom tupas_versigner import TupasVerisigner\n\nsigner = TupasVerisigner(\n input_secret, # Shared input secret.\n output_secret, # Shared output secret.\n base_output_url, # Base URL for the response.\n error_url # Error URL to return if signature verification fails.\n encoding='Windows-1252' # Optional, default: 'Windows-1252'\n)\n\nsigner.verify_and_sign_url(url)\n```\n\nFor example,\n\n```\nfrom tupas_versigner import TupasVerisigner\n\nsigner = TupasVerisigner(\n 'inputsecret',\n 'outputsecret'\n 'http://otherserver.com',\n 'http://otherserver.com/error.html'\n)\n\nurl = (\n 'http://someserver.com/?B02K_VERS=0003&B02K_TIMESTMP=50020181017141433899056&'\n 'B02K_IDNBR=2512408990&B02K_STAMP=20010125140015123456&B02K_CUSTNAME=FIRST%20'\n 'LAST&B02K_KEYVERS=0001&B02K_ALG=03&B02K_CUSTID=9984&B02K_CUSTTYPE=02&B02K_MA'\n 'C=EBA959A76B87AE8996849E7C0C08D4AC44B053183BE12C0DAC2AD0C86F9F2542'\n)\n\nsigner.verify_and_sign_url(url)\n```\n\n> http://otherserver.com/?firstname=First&lastname=Last&hash= 4f6536ca2a23592d9037a4707bb44980b9bd2d4250fc1c833812068ccb000712\n\n\n## Tests\n\n`pip install -r requirements.txt`\n\n\n### Unit tests\n\n`pytest`\n\n\n### Linting\n\n`flake8 .`\n`isort --recursive --diff . && isort --recursive --check-only .`\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/adarshk7/tupas_verisigner", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tupas-verisigner", "package_url": "https://pypi.org/project/tupas-verisigner/", "platform": "", "project_url": "https://pypi.org/project/tupas-verisigner/", "project_urls": { "Homepage": "http://github.com/adarshk7/tupas_verisigner" }, "release_url": "https://pypi.org/project/tupas-verisigner/0.0.1/", "requires_dist": null, "requires_python": ">=3.5", "summary": "TUPAS URL verification and signing", "version": "0.0.1" }, "last_serial": 4829543, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1b6b94fab4dafadc5638e270735649cc", "sha256": "15805cced2c2887096267c2a5b31fb0c3f789167057813af4b66467d8e4e65db" }, "downloads": -1, "filename": "tupas_verisigner-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1b6b94fab4dafadc5638e270735649cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4041, "upload_time": "2019-02-16T19:25:12", "url": "https://files.pythonhosted.org/packages/0b/2c/79877c675046b611c4e603593622cb8596e327203a7cdcf1c45309042b0c/tupas_verisigner-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "083d83769e28e0c3816ceb1f57ea5521", "sha256": "8a5a9fa8e099e6f34b386af69143d3fede0e2a4b7b3dfe2cfce961e8e93d6e88" }, "downloads": -1, "filename": "tupas_verisigner-0.0.1.tar.gz", "has_sig": false, "md5_digest": "083d83769e28e0c3816ceb1f57ea5521", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3616, "upload_time": "2019-02-16T19:25:14", "url": "https://files.pythonhosted.org/packages/4b/e6/27128b57b1b3f220dd920917051b4509d81e0310685846995d0b3703aa3d/tupas_verisigner-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1b6b94fab4dafadc5638e270735649cc", "sha256": "15805cced2c2887096267c2a5b31fb0c3f789167057813af4b66467d8e4e65db" }, "downloads": -1, "filename": "tupas_verisigner-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1b6b94fab4dafadc5638e270735649cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4041, "upload_time": "2019-02-16T19:25:12", "url": "https://files.pythonhosted.org/packages/0b/2c/79877c675046b611c4e603593622cb8596e327203a7cdcf1c45309042b0c/tupas_verisigner-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "083d83769e28e0c3816ceb1f57ea5521", "sha256": "8a5a9fa8e099e6f34b386af69143d3fede0e2a4b7b3dfe2cfce961e8e93d6e88" }, "downloads": -1, "filename": "tupas_verisigner-0.0.1.tar.gz", "has_sig": false, "md5_digest": "083d83769e28e0c3816ceb1f57ea5521", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3616, "upload_time": "2019-02-16T19:25:14", "url": "https://files.pythonhosted.org/packages/4b/e6/27128b57b1b3f220dd920917051b4509d81e0310685846995d0b3703aa3d/tupas_verisigner-0.0.1.tar.gz" } ] }