This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit 07c3f63ee178127900ef37a3f473ea6db2eb1ee3
Author: Daniel Gruno <[email protected]>
AuthorDate: Tue Sep 8 10:27:54 2020 +0200

    plug in github support
---
 server/endpoints/oauth.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/server/endpoints/oauth.py b/server/endpoints/oauth.py
index cccc711..3fd2068 100644
--- a/server/endpoints/oauth.py
+++ b/server/endpoints/oauth.py
@@ -21,6 +21,7 @@ import plugins.server
 import plugins.session
 import plugins.oauthGeneric
 import plugins.oauthGoogle
+import plugins.oauthGithub
 import typing
 import aiohttp.web
 import hashlib
@@ -43,6 +44,11 @@ async def process(
     if oauth_token and oauth_token.startswith("https://www.googleapis.com/";) 
and id_token:
         rv = await plugins.oauthGoogle.process(indata, session, server)
 
+    # GitHub OAuth - currently fetches email address only
+    if indata.get('key', '') == 'github' and code:
+        rv = await plugins.oauthGithub.process(indata, session, server)
+
+
     # Generic OAuth handler, only one we support for now. Works with ASF OAuth.
     elif state and code and oauth_token:
         rv = await plugins.oauthGeneric.process(indata, session, server)

Reply via email to