{ "info": { "author": "Santtu Pajukanta", "author_email": "santtu@pajukanta.fi", "bugtrack_url": null, "classifiers": [], "description": "PHPBB AUTHENTICATION IMPLEMENTED IN PYTHON\r\n==========================================\r\n\r\nAuthor: \tSanttu Pajukanta \r\nUpdated:\t2010-03-31\r\n\r\n\r\nIntroduction\r\n============\r\n\r\nphpbb-python implements the authentication part of phpBB3 in Python. This\r\nenables Python-based web applications to authenticate against the user\r\naccount database of an existing phpBB3 discussion board.\r\n\r\nA Django authentication backend is also provided. Tested with phpBB 3.0.7,\r\nDjango 1.0 and PostgreSQL 8.4. Other configurations may or may not work.\r\n\r\nThis documentation assumes extensive knowledge of the internals of both\r\nDjango and phpBB3. Not for the faint of heart. Use the Source, Luke.\r\n\r\n\r\nCopyright and licensing\r\n=======================\r\n\r\nThis is a very direct port of the login code in phpBB3 itself. Thus this\r\npackage can be considered a derivative work of phpBB3 and the license of\r\nphpBB3 (GPLv2, sadly not \"or later\") applies.\r\n\r\nHowever, should the phpBB3 software some day be relicensed to GPLv2 or\r\nlater, I won't stop you from using this package with the \"later\" licenses.\r\nTherefore, files that I don't consider derivative of phpBB3 carry only my\r\ncopyright notice and the \"GPLv2 or later\" license boilerplate.\r\n\r\nFor legal stuff, see the files COPYING and LICENSE.\r\n\r\n\r\nBasic usage (without Django)\r\n============================\r\n\r\nfrom phpbb.auth.sql import setup\r\nfrom phpbb.auth.auth_db import login_db\r\n\r\nimport psycopg2\r\n\r\nconn = psycopg2.connect(\r\n database=\"phpbb3\",\r\n user=\"phpbb3\",\r\n password=\"phpbb3\"\r\n)\r\nsetup(conn)\r\n\r\nresult, user_row = login_db(\"username\", \"password\")\r\nif result == \"LOGIN_SUCCESS\":\r\n print \"Multipass!\"\r\nelse:\r\n print \"You shall not pass!\"\r\n\r\n\r\nUsage with Django\r\n=================\r\n\r\nMake sure the \"phpbb\" module is somewhere in your PythonPath. Add this\r\nto your settings.py:\r\n\r\nAUTHENTICATION_BACKENDS = (\r\n ('django.contrib.auth.backends.ModelBackend'),\r\n ('phpbb.auth.backends.PhpbbBackend'),\r\n)\r\n\r\nPHPBB_AUTH_DB_MODULE = \"psycopg2\"\r\nPHPBB_AUTH_DB_KEYS = {\r\n \"user\": \"\",\r\n \"password\": \"\",\r\n \"database\": \"\",\r\n}\r\nPHPBB_AUTH_DB_PARAM_STYLE = \"%s\"\r\nPHPBB_AUTH_DB_USERS_TABLE = \"phpbb_users\"\r\n\r\nObviously, there's some filling in to do. Notice how we left ModelBackend in,\r\ntoo. This way we can define superusers etc. in Django and just the peons in\r\nphpBB3.\r\n\r\nThere's a working (WORKSFORME) example in examples/hammertime. Have fun.\r\n\r\n\r\nFAQ\r\n===\r\n\r\nQ: Can I have a pony?\r\nA: No, you can't have a pony.\r\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/japsu/phpbb-python", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "phpbb-python", "package_url": "https://pypi.org/project/phpbb-python/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/phpbb-python/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/japsu/phpbb-python" }, "release_url": "https://pypi.org/project/phpbb-python/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "phpBB authentication in Python", "version": "0.0.1" }, "last_serial": 898165, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7cac9154b02c4871834a31e7feb61d0e", "sha256": "e0b3d446bb6eec9283b70639f18c78831e6ce0982fedd174d65f96b3b8e0d824" }, "downloads": -1, "filename": "phpbb-python-0.0.1.zip", "has_sig": false, "md5_digest": "7cac9154b02c4871834a31e7feb61d0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32888, "upload_time": "2013-10-19T10:03:41", "url": "https://files.pythonhosted.org/packages/87/a1/a8337d1db1315c9726abf4bfd64521c29372e1d252db9f95ddabda31468e/phpbb-python-0.0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7cac9154b02c4871834a31e7feb61d0e", "sha256": "e0b3d446bb6eec9283b70639f18c78831e6ce0982fedd174d65f96b3b8e0d824" }, "downloads": -1, "filename": "phpbb-python-0.0.1.zip", "has_sig": false, "md5_digest": "7cac9154b02c4871834a31e7feb61d0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32888, "upload_time": "2013-10-19T10:03:41", "url": "https://files.pythonhosted.org/packages/87/a1/a8337d1db1315c9726abf4bfd64521c29372e1d252db9f95ddabda31468e/phpbb-python-0.0.1.zip" } ] }