]> git.parisson.com Git - django-social-auth.git/commitdiff
Merge pull request #223 from yekibud/master
authorMatías Aguirre <matiasaguirre@gmail.com>
Mon, 6 Feb 2012 18:44:55 +0000 (10:44 -0800)
committerMatías Aguirre <matiasaguirre@gmail.com>
Mon, 6 Feb 2012 18:44:55 +0000 (10:44 -0800)
restrict google login by white-listed domains

1  2 
social_auth/backends/google.py

index 5786938dc7d7e738f8b1dbd9adf1c8581197d04f,3f2d20254249b7f81c523119dd9a501b5fdfca6c..0daf57dc10b0f26452ada85a5427fe58049b0f70
@@@ -44,7 -44,10 +44,9 @@@ GOOGLE_OAUTH_SCOPE = ['https://www.goog
  GOOGLEAPIS_EMAIL = 'https://www.googleapis.com/userinfo/email'
  GOOGLE_OPENID_URL = 'https://www.google.com/accounts/o8/id'
  
 -EXPIRES_NAME = getattr(settings, 'SOCIAL_AUTH_EXPIRATION', 'expires')
  
+ # white-listed domains (else accept all)
+ GOOGLE_WHITE_LISTED_DOMAINS = getattr(settings, 'GOOGLE_WHITE_LISTED_DOMAINS', [])
  
  # Backends
  class GoogleOAuthBackend(OAuthBackend):