Skip to main content

Allows a user principal to be associated to multiple email accounts.

Project description

kotti_accounts is a Kotti plugin which allows a user principal to be associated to multiple email accounts.

Find out more about Kotti

For the impatient

There’s a demo which shows how it works. Just run the commands below inside a clean virtualenv.

git clone https://github.com/frgomes/kotti_velruse_demo.git
cd kotti_velruse_demo
./run-server.sh

Setup

  1. Insert kotti_accounts.kotti_configure on kotti.configurators

kotti.configurators = kotti_velruse.kotti_configure
                      kotti_accounts.kotti_configure
                      # other plugins...
  1. See also kotti_velruse for other configurations, since kotti_velruse and kotti_accounts were designed to work together.

Design Decisions

  • associate multiple externally authenticated identities to a single Principal.

  • substitute part of the internal registration workflow provided by kotti.security.

  • behave as a drop-in to the existing kotti.security Principals.

  • all existing test cases depending on Principals must pass.

  • integrate with kotti_velruse via events.

Workflow

New user

The actions enumerated below happen when a user authenticates for the first time using his/her external OpenID account (or any other authentication method):

  • the user’s real name and email address are obtained from the external provider;

  • a new Principal is created and populated with the real name and email address;

  • a new Account is created and populated with the email address;

  • the newly created Account is associated with the newly created Principal;

  • event UserSelfRegistered is triggered, in order to integrate with other plugins.

  • the session is then authenticated with the allocated Principal.

Returning user

These actions enumerated below happen when a returning user authenticates:

  • the user’s real name and email address are obtained from the external provider;

  • find the Account which matches the email address;

  • finds the Principal associated with the Account;

  • the session is then authenticated with the Principal found.

Add email to existing user

These actions enumerated below happen when new email addresses are added to an existing Principal, using the new Preferences page:

  • the user remains authenticated as he/she was, keeping the current Principal;

  • the user performs a new login, authenticates against another external provider;

  • the user’s real name and email address are obtained from the external provider;

  • a new Account is created and populated with the email address; the real name is discarded;

  • the newly created Account is associated with the existing created Principal;

  • the session remains authenticated as it was in the beginning.

Pending

  • (TODO) ability to merge accounts.

Troubleshooting

How do I authenticate as administrator?

The default authentication method provided by Kotti retrieves Principals from the database and compares the password you type against what is stored there. The authentication method provided by kotti_accounts relies on authentication performed by external providers, which means that the usual admin/qwerty is not valid anymore.

The way to become administrator consists on these steps:

  • Insert something similar to the below into your configuration file:

kotti.accounts.admins = admin@example.com
                        webmaster@example.com
  • Start the server and authenticate using some external provider, employing any of the emails listed as part of kotti.accounts.admins.

  • Stop the server

  • Remove the configuration you just done on kotti.accounts.admins.

  • Start the server

When you login to your previously created user account, using an external provider, you will be recognized as administrator.

Support

Please find links on the top of this page.

Authors

Richard Gomes <rgomes.info@gmail.com>

Changelog

0.2.5 (05-FEB-2014)

  • bugfix: trouble with Facebook authentication. Thanks tiberiuichim for your contribution! :)

0.2.4 (15-JAN-2014)

0.2.3 (21-Nov-2013)

  • Allows a list of administrative accounts. For example:

kotti.accounts.admins = admin@example.com
                        webmaster@example.com

0.2.2 (18-Nov-2013)

  • Propagates event UserSelfRegistered when a new Principal is created.

0.2.1 (11-Nov-2013)

  • Provides a replacement for Preferences page (@@prefs)

0.2 (06-Nov-2013)

  • Better integration with kotti_velruse

0.1 (02-Nov-2013)

  • Preview version.

Project details


Download files

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

Source Distributions

kotti_accounts-0.2.5.zip (23.6 kB view details)

Uploaded Source

kotti_accounts-0.2.5.tar.gz (17.4 kB view details)

Uploaded Source

File details

Details for the file kotti_accounts-0.2.5.zip.

File metadata

  • Download URL: kotti_accounts-0.2.5.zip
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for kotti_accounts-0.2.5.zip
Algorithm Hash digest
SHA256 7d05c6572053ef55a7279c49a5e9791f46353d0abec96e1d2f77f3591fc35d4f
MD5 8d1ed9091914218453742a7edc4253b1
BLAKE2b-256 46b3810c892a9f44c9f82c3d28510b655dbeed5ab6ecf7e9d86e89b3dcc5a353

See more details on using hashes here.

File details

Details for the file kotti_accounts-0.2.5.tar.gz.

File metadata

File hashes

Hashes for kotti_accounts-0.2.5.tar.gz
Algorithm Hash digest
SHA256 bf16cb741b8bb70d9753a4446d0f9f1a42349e558d52e121e9317df6dd2f3ab3
MD5 7f5008f6531c536d1c337136809f48cc
BLAKE2b-256 7d590c51a05aa595fe2fe04abf20bf2ee44a326dd33b4703e7b0a06af88bdf45

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page