Check which applications can be included in their `Google Data Protocol Directory`_
+Google OpenID
+-------------
+
+Configurable settings:
+
+- Supply a list of domain strings to be checked. The default (empty list) allows all domains. If a list is provided and a user attempts to sign in with a Google account that is not in the list, then a ValueError will be raised and the user will be redirected to your login error page::
+
+ WHITE_LISTED_DOMAINS = ['mydomain.com']
+
+
Orkut
-----
is unique enought to flag a single user. Email comes from schema:
http://axschema.org/contact/email"""
# only include white-listed domains
- import re
- for domain in WHITE_LISTED_DOMAINS:
- if not re.search(domain, details['email']):
- raise ValueError('INVALID DOMAIN')
+ if WHITE_LISTED_DOMAINS and details['email'].split('@')[1] not in WHITE_LISTED_DOMAINS:
+ raise ValueError('INVALID DOMAIN')
return details['email']