pyramid_persona let you quickly set up authentication using persona on your pyramid project. It provides a way to conveniently replace the login form and all the processing and security concerns that comes with it. It aims at giving as much as possible with as little configuration as possible, while still letting you customize if you want. If you want to see some screenshots of the demo app, take a look at this blog post.
First of all, include pyramid_persona. Add this in your project configuration
Then, we need two little lines in your config files : a secret used to sign cookies, and the audience, the hostname and port of your website (this is needed for security reasons):
persona.secret = This is some secret string persona.audiences = http://localhost:6543
There, we’re done. We now have a nice forbidden view with a persona login button.
Then, you can add the button in your page. request.persona_button provides a login if the user is not logged in, and a logout button if they are.
A basic page might be (using mako)
pyramid_persona is a login system. It replaces login forms and views, and the need to handle passwords.
pyramid_persona is not an authentication policy. It only handles the login process and requires an authentication policy to remember the user between requests (SessionAuthenticationPolicy is used by default).
Here is, in details, what including pyramid_persona does :
You can replace any part you like if the default behaviour doesn’t work for you and the configuration isn’t enough.
This project is made by Georges Dubus (@georgesdubus). Bug reports and pull requests are welcome.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|pyramid_persona-1.6.1-py2.py3-none-any.whl (12.1 kB) Copy SHA256 Checksum SHA256||py2.py3||Wheel||Sep 11, 2015|
|pyramid_persona-1.6.1.tar.gz (10.7 kB) Copy SHA256 Checksum SHA256||–||Source||Sep 11, 2015|