예제 #1
0
def authorization_code():

    provider = CloudstackAuthorizationProvider()

    response = provider.get_authorization_code_from_uri(request.url)

    res = make_response(response.text, response.status_code)
    for k, v in response.headers.iteritems():
        res.headers[k] = v
    return res
예제 #2
0
파일: OAuth2.py 프로젝트: grze/gstack
def token():
    provider = CloudstackAuthorizationProvider()

    data = {k: request.form[k] for k in request.form.iterkeys()}

    response = provider.get_token_from_post_data(data)

    res = make_response(response.text, response.status_code)
    for k, v in response.headers.iteritems():
        res.headers[k] = v
    return res
예제 #3
0
def token():
    provider = CloudstackAuthorizationProvider()

    data = {k: request.form[k] for k in request.form.iterkeys()}

    response = provider.get_token_from_post_data(data)

    res = make_response(response.text, response.status_code)
    for k, v in response.headers.iteritems():
        res.headers[k] = v

    return res