==========================================
Author: Santtu Pajukanta <santtu@pajukanta.fi>
Updated: 2010-03-31
Introduction
============
phpbb-python implements the authentication part of phpBB3 in Python. This
enables Python-based web applications to authenticate against the user
account database of an existing phpBB3 discussion board.
A Django authentication backend is also provided. Tested with phpBB 3.0.7,
Django 1.0 and PostgreSQL 8.4. Other configurations may or may not work.
This documentation assumes extensive knowledge of the internals of both
Django and phpBB3. Not for the faint of heart. Use the Source, Luke.
Copyright and licensing
=======================
This is a very direct port of the login code in phpBB3 itself. Thus this
package can be considered a derivative work of phpBB3 and the license of
phpBB3 (GPLv2, sadly not "or later") applies.
However, should the phpBB3 software some day be relicensed to GPLv2 or
later, I won't stop you from using this package with the "later" licenses.
Therefore, files that I don't consider derivative of phpBB3 carry only my
copyright notice and the "GPLv2 or later" license boilerplate.
For legal stuff, see the files COPYING and LICENSE.
Basic usage (without Django)
============================
from phpbb.auth.sql import setup
from phpbb.auth.auth_db import login_db
import psycopg2
conn = psycopg2.connect(
database="phpbb3",
user="phpbb3",
password="phpbb3"
)
setup(conn)
result, user_row = login_db("username", "password")
if result == "LOGIN_SUCCESS":
print "Multipass!"
else:
print "You shall not pass!"
Usage with Django
=================
Make sure the "phpbb" module is somewhere in your PythonPath. Add this
to your settings.py:
AUTHENTICATION_BACKENDS = (
('django.contrib.auth.backends.ModelBackend'),
('phpbb.auth.backends.PhpbbBackend'),
)
PHPBB_AUTH_DB_MODULE = "psycopg2"
PHPBB_AUTH_DB_KEYS = {
"user": "",
"password": "",
"database": "",
}
PHPBB_AUTH_DB_PARAM_STYLE = "%s"
PHPBB_AUTH_DB_USERS_TABLE = "phpbb_users"
Obviously, there's some filling in to do. Notice how we left ModelBackend in,
too. This way we can define superusers etc. in Django and just the peons in
phpBB3.
There's a working (WORKSFORME) example in examples/hammertime. Have fun.
FAQ
===
Q: Can I have a pony?
A: No, you can't have a pony.
Metadata
Release files for phpbb-python 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| phpbb-python-0.0.1.zip | 32.9 kB | Without provenance | Details for phpbb-python-0.0.1.zip |
Release files / phpbb-python-0.0.1.zip
| Download URL | phpbb-python-0.0.1.zip |
|---|---|
| Size | 32.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0b3d446bb6eec9283b70639f18c78831e6ce0982fedd174d65f96b3b8e0d824
|
|
BLAKE2b-256 checksum How to use checksums |
87a1a8337d1db1315c9726abf4bfd64521c29372e1d252db9f95ddabda31468e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for phpbb-python 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.