

def getToken(self, code):
    params = {
        'code': code,
        'client_id': self.clientId,
        'client_secret': self.clientSecret,
        'redirect_uri': self.redirectUri,
    }
    resp = self._getJson(method='POST', url=self._TOKEN_URL, data=params, headers={
        'Accept': 'application/json',
    })
    if ('error' in resp):
        raise RestException(('Got an error exchanging token from provider: "%s".' % resp), code=502)
    return code

dataset/ETHPy150Open girder/girder/plugins/oauth/server/providers/github.py GitHub.getToken/VarMisuse@101/157 `resp`->`code`