

@classmethod
def getUrl(cls, state):
    clientId = cls.model('setting').get(constants.PluginSettings.GITHUB_CLIENT_ID)
    if (clientId is None):
        raise Exception('No GitHub client ID setting is present.')
    callbackUrl = '/'.join((getApiUrl(), 'oauth', 'github', 'callback'))
    query = urllib.parse.urlencode({
        'client_id': clientId,
        'redirect_uri': callbackUrl,
        'state': state,
        'scope': ','.join(cls._AUTH_SCOPES),
    })
    return ('%s?%s' % (cls._AUTH_URL, query))

dataset/ETHPy150Open girder/girder/plugins/oauth/server/providers/github.py GitHub.getUrl/original