Esempio n. 1
0
def retrieve_google_access_token(oauth_map):
    # Start Google access token process
    try:
        google_client = GoogleOAuthClient()
        google_token = google_client.fetch_access_token(oauth_map)
    except Exception, e:
        raise OAuthError(e.message)
Esempio n. 2
0
def google_request_token_handler(oauth_map):
    # Start Google request token process
    try:
        google_client = GoogleOAuthClient()
        google_token = google_client.fetch_request_token(oauth_map)
    except Exception, e:
        return oauth_error_response(OAuthError(e.message))
Esempio n. 3
0
def google_request_token_handler(oauth_map):
    # Start Google request token process
    try:
        google_client = GoogleOAuthClient()
        google_token = google_client.fetch_request_token(oauth_map)
    except Exception, e:
        return oauth_error_response(OAuthError(e.message))
Esempio n. 4
0
def retrieve_google_access_token(oauth_map):
    # Start Google access token process
    google_client = GoogleOAuthClient()
    google_token = google_client.fetch_access_token(oauth_map)

    oauth_map.google_access_token = google_token.key
    oauth_map.google_access_token_secret = google_token.secret

    return oauth_map
Esempio n. 5
0
def retrieve_google_access_token(oauth_map):
    # Start Google access token process
    google_client = GoogleOAuthClient()
    google_token = google_client.fetch_access_token(oauth_map)

    oauth_map.google_access_token = google_token.key
    oauth_map.google_access_token_secret = google_token.secret

    return oauth_map
Esempio n. 6
0
def retrieve_google_access_token(oauth_map):
    # Start Google access token process
    import logging
    logging.error("import access token")
    google_client = GoogleOAuthClient()
    logging.error("import access token")
    google_token = google_client.fetch_access_token(oauth_map)

    logging.error("1")
    oauth_map.google_access_token = google_token.key
    logging.error(google_token.key)
    logging.error("2")
    oauth_map.google_access_token_secret = google_token.secret
    logging.error(google_token.secret)

    return oauth_map
Esempio n. 7
0
def get_google_user_id_and_email_from_oauth_map(oauth_map):
    google_client = GoogleOAuthClient()
    return google_client.access_user_id_and_email(oauth_map)
Esempio n. 8
0
def get_google_user_id_and_email_from_oauth_map(oauth_map):
    google_client = GoogleOAuthClient()
    return google_client.access_user_id_and_email(oauth_map)