Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

simple auth scheme for pyramid, based on Mako template and sqlalchemy backend

Project Description

this package aims to give and easy pluggable module to provide authentication.

To activate the package, in your main __init__.py file, inside the main function, add this line: config.include(‘ppss_auth’)

It’s based upon sqlalchemy backend for the creation and usage of 3 main tables: ppss_user - containing basic information about the users (username, hashed password and related data ) ppss_group - user groups to allow for easier handling of user groups and permissions ppss_permission - a list of permissions (just an id and a name)

When a user login, sessionauthpolicy is used to store her informations (userid and user groups)

ppss_auth use these info from the ini file:

ppss_auth.adminname - the name of a sueruser. If not provided, no super user is aver used ppss_auth.adminpass - the corresponding password ppss_auth.post_login_follow - try to redirect the browser back to where it came from after successful login (use true case insensitive to activate it). It’s useful if combined with the forbidden pattern ppss_auth.post_login_route - name of the route where to send the browser after user logged in. Default to Home. Ignored if ppss_auth.post_login_follow is set to true AND there is a referer to go to. ppss_auth.post_logout_route - name of the route where to send the browser after log out. Defaults to home

to init the Tables, in the initialization script, add this row: from ppss_auth import (models as ppssmodels)

while creating the default data you use something like: ppssmodels.initdb(dbsession,createdefault=False) This creates the tables and, if createdefault evaulates to True, it create a default admin/admin user with the admin permission. Please change the password to avoid secuirity issues the method retunrs (adminuser,adminpassword) On users use the setPassword method to change the password, providing the new password

Release History

This version
History Node

0.4.1

History Node

0.4

History Node

0.2.9

History Node

0.2.8

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
ppss_auth-0.4.1.tar.gz
(5.1 kB) Copy SHA256 Hash SHA256
Source Dec 16, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting