You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by cr...@apache.org on 2018/01/05 16:50:10 UTC

incubator-airflow git commit: [AIRFLOW-1969] Always use HTTPS URIs for Google OAuth2

Repository: incubator-airflow
Updated Branches:
  refs/heads/master 7fa3e12b0 -> e46cde418


[AIRFLOW-1969] Always use HTTPS URIs for Google OAuth2

Closes #2900 from intellectronica/google-auth-
force-scheme


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/e46cde41
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/e46cde41
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/e46cde41

Branch: refs/heads/master
Commit: e46cde418289802f2ddf7618fe87d61caed6044a
Parents: 7fa3e12
Author: Eleanor Berger <el...@getyourguide.com>
Authored: Fri Jan 5 08:49:42 2018 -0800
Committer: Chris Riccomini <cr...@apache.org>
Committed: Fri Jan 5 08:49:46 2018 -0800

----------------------------------------------------------------------
 airflow/contrib/auth/backends/google_auth.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/e46cde41/airflow/contrib/auth/backends/google_auth.py
----------------------------------------------------------------------
diff --git a/airflow/contrib/auth/backends/google_auth.py b/airflow/contrib/auth/backends/google_auth.py
index f73e035..65e0f3a 100644
--- a/airflow/contrib/auth/backends/google_auth.py
+++ b/airflow/contrib/auth/backends/google_auth.py
@@ -109,6 +109,7 @@ class GoogleAuthBackend(object):
         return self.google_oauth.authorize(callback=url_for(
             'google_oauth_callback',
             _external=True,
+            _scheme='https',
             next=request.args.get('next') or request.referrer or None))
 
     def get_google_user_profile_info(self, google_token):
@@ -125,7 +126,7 @@ class GoogleAuthBackend(object):
     def domain_check(self, email):
         domain = email.split('@')[1]
         domains = get_config_param('domain').split(',')
-        if domain in domains:	
+        if domain in domains:
             return True
         return False
 
@@ -183,4 +184,3 @@ login_manager = GoogleAuthBackend()
 
 def login(self, request):
     return login_manager.login(request)
-