{ "info": { "author": "Microsec ltd.", "author_email": "development@passbyme.com", "bugtrack_url": null, "classifiers": [], "description": "PassBy[ME] Mobile ID client\r\n===========================\r\n\r\nThis library provides you with functionality to handle PassBy[ME]\r\nmessages.\r\n\r\nFor further information on PassBy[ME] please visit:\r\n`www.passbyme.com `__ and sign up for a free\r\naccount. You can download our API documentation after login.\r\n\r\nTable of contents\r\n=================\r\n\r\n- `Installation <#installation>`__\r\n- `Usage <#usage>`__\r\n\r\n - `PassByME2FAClient <#passbyme2faclient>`__\r\n - `Handling messages <#handling-messages>`__\r\n\r\n - `Sending messages <#sending-messages>`__\r\n - `Tracking messages <#tracking-messages>`__\r\n - `Cancelling messages <#cancelling-messages>`__\r\n - `SessionInfo <#sessioninfo>`__\r\n\r\n - `Errors <#errors>`__\r\n\r\n - `HTTPError <#httperror>`__\r\n - `PassByMEError <#passbymeerror>`__\r\n\r\n- `Build <#build>`__\r\n- `Release History <#release-history>`__\r\n\r\nInstallation\r\n============\r\n\r\nMinimum required Python version is 2.7.9.\r\n\r\n::\r\n\r\n pip install passbyme2fa_client\r\n\r\nUsage\r\n=====\r\n\r\nTo use the PassBy[ME] Mobile ID SDK first you have to acquire the\r\nfollowing:\r\n\r\n- Account authentication PEM file and its password\r\n\r\nYou can get these after registering at\r\n`www.passbyme.com `__, by hitting the \"Sign up\r\nfor free\" button. To complete the registration you will need an Android,\r\niOS or Windows Phone device with the PassBy[ME] application installed.\r\n\r\nIf you login after registration you can download the PEM from the\r\nApplication menu. You can add new applications to your registration by\r\nhitting the \"New application\". The application (along with its\r\nApplication Id) will appear in the table below.\r\n\r\n*We suggest you to read the available User Guides and API documentation\r\nbefore you continue with the integration. You can download these from\r\nthe Documentation section of the administration website after login.*\r\n\r\nPassByME2FAClient\r\n-----------------\r\n\r\n.. code:: python\r\n\r\n from passbyme2fa_client import *\r\n\r\n pbm = PassByME2FAClient(\r\n key = \"auth.pem\",\r\n cert = \"auth.pem\",\r\n password = \"\"\r\n )\r\n\r\nThe **PassByME2FAClient** constructor accepts the following parameters:\r\n\r\n- **key**: the path of the authentication key PEM file.\r\n- **cert**: the path of the authentication certificate PEM file. (May\r\n be the same as **key** if the PEM file contains both the certificate\r\n and the key.)\r\n- **address**: The address of the PassBy[ME] service to use. This\r\n parameter is optional. by default the SDK will connect to\r\n auth-sp.passbyme.com.\r\n\r\nThrows a\r\n`ValueError `__\r\nwhen a required parameter is missing.\r\n\r\nHandling Messages\r\n-----------------\r\n\r\nSending messages\r\n~~~~~~~~~~~~~~~~\r\n\r\n.. code:: python\r\n\r\n session_info = pbm.send_message(\r\n recipients = [\"test@pers.on\"],\r\n availability = 300,\r\n type = PassByME2FAClient.MessageType.AUTHORIZATION,\r\n subject = \"Test subject\", body = \"Test message\"\r\n )\r\n\r\nThe **send\\_message** method accepts the following parameters:\r\n\r\n- **recipients**: An array containing the PassBy[ME] ID-s of the\r\n recipients\r\n- **subject**: The subject of the message\r\n- **body**: The body of the message\r\n- **availability**: The availability of the message in seconds\r\n- **type**: One of the following types:\r\n\r\n - **PassByME2FAClient.MessageType.AUTHORIZATION** - for\r\n authorization requests\r\n - **PassByME2FAClient.MessageType.MESSAGE** - to send a general\r\n message with arbitrary body\r\n - **PassByME2FAClient.MessageType.ESIGN** - if the message body\r\n contains an esign url\r\n\r\nWhen successful, returns a `SessionInfo <#sessioninfo>`__ object.\r\n\r\nThrows a\r\n`ValueError `__\r\nwhen a required parameter is missing. Throws an\r\n`HTTPError <#httperror>`__ if an error in HTTP communication occurs.\r\n**HTTPError.response** contains the HTTP response. Throws a\r\n`PassByMEError <#passbymeerror>`__ if a PassBy[ME] specific error\r\noccurs. **PassByMEError.response** contains the JSON response received\r\nfrom the PassBy[ME] server as a dictionary.\r\n\r\nTracking messages\r\n~~~~~~~~~~~~~~~~~\r\n\r\n.. code:: python\r\n\r\n session_info.refresh()\r\n\r\nTo track messages, the most efficient way is to call\r\n**SessionInfo.refresh()**. After a successful call, the\r\n`SessionInfo <#sessionInfo>`__ object will contain up-to-date\r\ninformation about the message.\r\n\r\nThrows an `HTTPError <#httperror>`__ if an error in HTTP communication\r\noccurs. Throws a `PassByMEError <#passbymeerror>`__ if a PassBy[ME]\r\nspecific error occurs.\r\n\r\nCancelling messages\r\n~~~~~~~~~~~~~~~~~~~\r\n\r\n.. code:: python\r\n\r\n session_info.cancel()\r\n\r\nTo cancel the message, the most efficient way is to call\r\n**SessionInfo.cancel()**. After a successful call, the message will be\r\ncancelled and the `SessionInfo <#sessionInfo>`__ object will contain\r\nup-to-date information about the message.\r\n\r\nThrows an `HTTPError <#httperror>`__ if an error in HTTP communication\r\noccurs. Throws a `PassByMEError <#passbymeerror>`__ if a PassBy[ME]\r\nspecific error occurs.\r\n\r\nSessionInfo\r\n~~~~~~~~~~~\r\n\r\nThe **SessionInfo** object describes the state of a message session. It\r\nconsists of the following attributes:\r\n\r\n- **message\\_id**: The id of the message that can be used to reference\r\n the message\r\n- **expiration\\_date**: The date and time (as an\r\n `Arrow `__ object)\r\n until which the message can be downloaded with the PassBy[ME]\r\n applications\r\n- **recipient\\_statuses**: An array of **RecipientStatus** objects.\r\n Each object consist of the following fields:\r\n\r\n - **user\\_id**: The PassBy[ME] ID of the user represented by this\r\n recipient object\r\n - **status**: The delivery status of this message for this user\r\n\r\nAvailable statuses are (all constants available as\r\n**PassByME2FAClient.MessageStatus.**\\ \\*):\r\n\r\n- **PENDING**: Initial status of the message.\r\n- **NOTIFIED**: The recipient has been notified about a new message.\r\n- **DOWNLOADED**: The recipient has downloaded the message, but has not\r\n uploaded the evidence yet.\r\n- **SEEN**: The recipient has seen the message and uploaded the\r\n evidence.\r\n- **NOT\\_SEEN**: The recipient has not seen the message.\r\n- **NOT\\_NOTIFIED**: The recipient has not received the notification.\r\n- **NOT\\_DOWNLOADED**: The recipient received the notification about\r\n the message but has not downloaded the message\r\n- **NO\\_DEVICE**: The message could not be sent because the recipient\r\n had no PassBy[ME] ready device that supports messaging.\r\n- **FAILED**: The message could not be sent because of an error.\r\n- **DISABLED**: The message could not be sent because the recipient is\r\n disabled.\r\n- **CANCELLED**: The message was cancelled by the sender.\r\n- **APPROVED**: Authentication has finished successfully.\r\n- **DENIED**: The user has cancelled the authentication.\r\n\r\nErrors\r\n------\r\n\r\nHTTPError\r\n~~~~~~~~~\r\n\r\nDenotes that the server responded with a HTTP error code. Its readable\r\n**response** attribute contains the\r\n`HTTPResponse `__\r\nreceived from the server.\r\n\r\nPassByMEError\r\n~~~~~~~~~~~~~\r\n\r\nDenotes a PassBy[ME] specific error. See the API documentation for the\r\npossible error codes. Its readable **response** attribute contains the\r\nJSON message received from the server as a dictionary.\r\n\r\nBuild\r\n=====\r\n\r\nTo build the package, first we have to run our tests, which can be done\r\ntyping\r\n\r\n::\r\n\r\n python setup.py test\r\n\r\nIf the tests all pass, we can create the distribution package using the\r\ncommand\r\n\r\n::\r\n\r\n python setup.py sdist\r\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/microsec/passbyme2fa-client-python", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.passbyme.com/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "passbyme2fa_client", "package_url": "https://pypi.org/project/passbyme2fa_client/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/passbyme2fa_client/", "project_urls": { "Download": "https://github.com/microsec/passbyme2fa-client-python", "Homepage": "https://www.passbyme.com/" }, "release_url": "https://pypi.org/project/passbyme2fa_client/1.0.7/", "requires_dist": null, "requires_python": null, "summary": "Messaging SDK for PassBy[ME] Mobile ID solution", "version": "1.0.7" }, "last_serial": 2585255, "releases": { "1.0.4": [ { "comment_text": "", "digests": { "md5": "2ef5ffc0055a7e19afe711940c165a89", "sha256": "621fddf0568112251fbb155e7cba6644b93dc9a7adcece6a403f05969ca3eda6" }, "downloads": -1, "filename": "passbyme2fa_client-1.0.4.tar.gz", "has_sig": false, "md5_digest": "2ef5ffc0055a7e19afe711940c165a89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20535, "upload_time": "2017-01-19T14:47:26", "url": "https://files.pythonhosted.org/packages/4e/7f/009b942d5ba7d05715232484df196d2b06c0642788c64beb17105ca604c9/passbyme2fa_client-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "5259b5cf5b9262225d3581281823a6f7", "sha256": "fb90bf1296c5d5ab4e724bda07ad614f50e479513050f6f4c168b529b4f13db8" }, "downloads": -1, "filename": "passbyme2fa_client-1.0.5.tar.gz", "has_sig": false, "md5_digest": "5259b5cf5b9262225d3581281823a6f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20551, "upload_time": "2017-01-19T15:08:42", "url": "https://files.pythonhosted.org/packages/15/bc/1490699099628c8eaa7ff012adf9a8390cd5766d269ed5976bcf0ee33d1d/passbyme2fa_client-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "c20c17a4250ec31e8eadadc07f4502fd", "sha256": "3c00fefad84542629febc5b4935050a556e984969b56880382f5451b5707174a" }, "downloads": -1, "filename": "passbyme2fa_client-1.0.6.tar.gz", "has_sig": false, "md5_digest": "c20c17a4250ec31e8eadadc07f4502fd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20535, "upload_time": "2017-01-19T15:19:11", "url": "https://files.pythonhosted.org/packages/f8/55/c8cee9816ee2d2f0902ae2109a22fce6dcf21d14ead44705390d158f3e76/passbyme2fa_client-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "995253c99caf73d28c0299e5a2553ff1", "sha256": "e4a6ba6a5ff2067b02a6851edc54422c14843d3705ce8b13b9e9315a37ec18be" }, "downloads": -1, "filename": "passbyme2fa_client-1.0.7.tar.gz", "has_sig": false, "md5_digest": "995253c99caf73d28c0299e5a2553ff1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20627, "upload_time": "2017-01-19T15:32:45", "url": "https://files.pythonhosted.org/packages/5e/0a/4c2a23be29e23112bf964365ecdbc651ab7c58fee73fa7b79b7894579cfa/passbyme2fa_client-1.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "995253c99caf73d28c0299e5a2553ff1", "sha256": "e4a6ba6a5ff2067b02a6851edc54422c14843d3705ce8b13b9e9315a37ec18be" }, "downloads": -1, "filename": "passbyme2fa_client-1.0.7.tar.gz", "has_sig": false, "md5_digest": "995253c99caf73d28c0299e5a2553ff1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20627, "upload_time": "2017-01-19T15:32:45", "url": "https://files.pythonhosted.org/packages/5e/0a/4c2a23be29e23112bf964365ecdbc651ab7c58fee73fa7b79b7894579cfa/passbyme2fa_client-1.0.7.tar.gz" } ] }