You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ponymail.apache.org by GitBox <gi...@apache.org> on 2021/06/07 20:23:23 UTC
[GitHub] [incubator-ponymail-foal] sbp opened a new issue #41: Potential minor style issue in oauth.py
sbp opened a new issue #41:
URL: https://github.com/apache/incubator-ponymail-foal/issues/41
```
# Google OAuth - currently fetches email address only
if indata.get("key", "") == "google" and id_token and server.config.oauth.google_client_id:
rv = await plugins.oauthGoogle.process(indata, session, server)
# GitHub OAuth - Fetches name and email
if indata.get("key", "") == "github" and code and server.config.oauth.github_client_id:
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)
```
Should the [middle if](https://github.com/apache/incubator-ponymail-foal/blob/e31303ae0cc549b950589074efb396ad0025a5b2/server/endpoints/oauth.py#L46) be `elif` instead? It wouldn't affect the branching.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-ponymail-foal] sebbASF commented on issue #41: Potential minor style issue in oauth.py
Posted by GitBox <gi...@apache.org>.
sebbASF commented on issue #41:
URL: https://github.com/apache/incubator-ponymail-foal/issues/41#issuecomment-856297863
Also maybe invoke indata.get("key", "") once.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-ponymail-foal] Humbedooh closed issue #41: Potential minor style issue in oauth.py
Posted by GitBox <gi...@apache.org>.
Humbedooh closed issue #41:
URL: https://github.com/apache/incubator-ponymail-foal/issues/41
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-ponymail-foal] Humbedooh commented on issue #41: Potential minor style issue in oauth.py
Posted by GitBox <gi...@apache.org>.
Humbedooh commented on issue #41:
URL: https://github.com/apache/incubator-ponymail-foal/issues/41#issuecomment-856238476
I think an elif will make it clearer, yes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org