Commit Graph

18 Commits

Author SHA1 Message Date
00ab822ea8 Fix deprecated comparison structs 2019-01-17 21:19:57 +01:00
0883ac6423 Fix whitespace and indentation, per pep8 2019-01-17 20:47:43 +01:00
87237f6536 Tabs, meet your new overlords: spaces
In a quest to reach pep8, use spaces to indent rather than tabs.
2019-01-17 15:35:39 +01:00
e62309a391 Fix typos in comments
Review by Stephen Frost and Jonathan S. Katz
Discussion: https://postgr.es/m/6EEB2B47-D274-4E65-83B1-2EF8C917C55F%40yesql.se
2018-12-04 21:51:08 +01:00
7ed70f1067 Add a createuser callback for cauth django plugin
This callback can prevent new users from being created based on specific
criteria. The plugin is defined in settings.py, so it can be any python
code. For example, it can look up in a specific table if this user is
supposed to be allowed to log in at all.
2018-01-13 18:14:13 +01:00
79659ae1dc Add ability to import user to django cauth example
This has been in used around a number of community sites already,
backpatch it into the upstream master.
2018-01-13 18:11:21 +01:00
38ff645d5d Add possibility to turn off django cauth using settings in sample
This sample is used across most of our other sites, so add functionality
to install without having a local master repo.

Back-patch of pgeu commit 3e4d8c9101c2d309b134c2f5638aa40db8ef2cf5
2018-01-13 18:09:27 +01:00
b8dd050611 Fix typo 2016-03-15 09:58:38 +00:00
51c10ee9df Replace simpljson imports with json
This has been in standard python since 2.6, and we don't really care
about supporting anything older than that (even our old and soon to
be upgraded environments use 2.7)
2015-12-12 17:44:22 +01:00
a80790508c Return proper errorcodes in django auth plugin example
Instead of raising an exception which will cause both a server log
and an email to be sent, return a proper http 400 message when the
incoming authentication request is bad. This will also show the
proper error message to the client, instead of a generic internal
server error.
2015-07-08 13:36:56 +01:00
d15abdc301 Remove unused variables 2015-07-08 13:36:56 +01:00
c6c43c1689 Implement user searching in the community auth system
This lets downstream systems securely search for users that are in
the system, so they can populate their local database with users
before they have logged in if necessary. This can be used for example
for the commitfest management system to be able to flag users as
authors and reviewers even before they have logged in.
2014-07-19 15:12:27 +02:00
e839e38976 Sync up auth demo plugin with what's actually used
The newer version is at least used by the pgeu system and by the
new commitfest one, and has some fallback for the duplicate-email
issue.
2014-07-19 15:12:27 +02:00
137d4295f3 Remove unused code causing warnings 2014-01-01 16:41:27 +01:00
78de94d17c Update community authentication to pass an arbitrary datablock instead of url
This makes it possible to pass URLs that will fail when they end up being double
escaped in some cases, since they contain non-url-safe characters. Instead, they'd
be base64-encoded, and thus safe.

Also update the django community auth provider to do just this, including encrypting
the data with the site secret key to make sure it can't be changed/injected by
tricking the user to go directly to the wrong URL.
2013-06-20 15:16:47 +02:00
4e3dc6c795 Add sample login.html for django admin logins 2011-12-28 15:03:55 +01:00
88d0b6148d Implement single sign-out for community login 2.0
In order to provide a consistent user experience, we must sign the
user out from the main website if the community site provides a logout
button - else that button will appear not to work...
2011-12-27 19:35:51 +01:00
5ef06f359d Add sample django community authentication consumer 2011-12-22 19:25:33 +01:00