def get_oauth_user_info(self, provider, resp):
<EOL>if provider == "<STR_LIT>" or provider == "<STR_LIT>":<EOL><INDENT>me = self.appbuilder.sm.oauth_remotes[provider].get("<STR_LIT:user>")<EOL>log.debug("<STR_LIT>".format(me.data))<EOL>return {"<STR_LIT:username>": "<STR_LIT>" + me.data.get("<STR_LIT>")}<EOL><DEDENT>if provider == "<STR_LIT>":<EOL><INDENT>me = self.appbuilder.sm.oauth_remotes[provider].get("<STR_LIT>")<EOL>log.debug("<STR_LIT>".format(me.data))<EOL>return {"<STR_LIT:username>": "<STR_LIT>" + me.data.get("<STR_LIT>", "<STR_LIT>")}<EOL><DEDENT>if provider == "<STR_LIT>":<EOL><INDENT>me = self.appbuilder.sm.oauth_remotes[provider].get(<EOL>"<STR_LIT>"<EOL>)<EOL>log.debug("<STR_LIT>".format(me.data))<EOL>return {<EOL>"<STR_LIT:username>": "<STR_LIT>" + me.data.get("<STR_LIT:id>", "<STR_LIT>"),<EOL>"<STR_LIT:email>": me.data.get("<STR_LIT>", "<STR_LIT>"),<EOL>"<STR_LIT>": me.data.get("<STR_LIT>", "<STR_LIT>"),<EOL>"<STR_LIT>": me.data.get("<STR_LIT>", "<STR_LIT>"),<EOL>}<EOL><DEDENT>if provider == "<STR_LIT>":<EOL><INDENT>me = self.appbuilder.sm.oauth_remotes[provider].get("<STR_LIT>")<EOL>log.debug("<STR_LIT>".format(me.data))<EOL>return {<EOL>"<STR_LIT:username>": "<STR_LIT>" + me.data.get("<STR_LIT:id>", "<STR_LIT>"),<EOL>"<STR_LIT>": me.data.get("<STR_LIT>", "<STR_LIT>"),<EOL>"<STR_LIT>": me.data.get("<STR_LIT>", "<STR_LIT>"),<EOL>"<STR_LIT:email>": me.data.get("<STR_LIT:email>", "<STR_LIT>"),<EOL>}<EOL><DEDENT>if provider == "<STR_LIT>":<EOL><INDENT>log.debug("<STR_LIT>".format(resp))<EOL>id_token = resp["<STR_LIT>"]<EOL>log.debug(str(id_token))<EOL>me = self._azure_jwt_token_parse(id_token)<EOL>log.debug("<STR_LIT>".format(me))<EOL>return {<EOL>"<STR_LIT:name>": me["<STR_LIT:name>"],<EOL>"<STR_LIT:email>": me["<STR_LIT>"],<EOL>"<STR_LIT>": me["<STR_LIT>"],<EOL>"<STR_LIT>": me["<STR_LIT>"],<EOL>"<STR_LIT:id>": me["<STR_LIT>"],<EOL>"<STR_LIT:username>": me["<STR_LIT>"],<EOL>}<EOL><DEDENT>else:<EOL><INDENT>return {}<EOL><DEDENT>
Since there are different OAuth API's with different ways to
retrieve user info