oauth2client

Google OAuth2 PlayGround returns “Unauthorized Client”

我们两清 提交于 2019-12-25 02:43:15
问题 clientId = xxxxxx clientSecret = xxxxxxxx applicationHost = xxxxxxxxx My authorization code request: OAuthClientRequest oAuthClientRequest = OAuthClientRequest .authorizationProvider(OAuthProviderType.GOOGLE) .setResponseType("code") .setClientId(clientId) .setParameter("access_type", "online") .setRedirectURI(applicationHost + "auth/google/callback") .setScope("https://www.googleapis.com/auth/plus.login") .buildQueryMessage(); response.sendRedirect(oAuthClientRequest.getLocationUri()); I am

is there a deep dive on google's oauth2 scopes?

萝らか妹 提交于 2019-12-23 13:13:43
问题 I'm looking for some deep down detailed information on google's use of oauth scopes My Drive app is working, so I get the simple use of scopes. However I have the following detailed questions/issues.. I specify scopes twice. Once in my app and then also in the API Console. What is the respective significance of these two scope declarations? If I remove scopes, must my user re-authorise my app, or is this only required for adding additional scopes? If the answer to 2, is 'I can't silently

Django 1.7 google oauth2 token validation failure

左心房为你撑大大i 提交于 2019-12-21 04:22:06
问题 I'm trying to get through the process of authenticating a Google token for accessing a user's calendar within a Django application. Although I've followed several indications found on the web, I'm stuck with a 400 error code response to my callback function (Bad Request). views.py # -*- coding: utf-8 -*- import os import argparse import httplib2 import logging from apiclient.discovery import build from oauth2client import tools from oauth2client.django_orm import Storage from oauth2client

Issues with Generating Authorization code and User Token using Apache OAuth client 2.0 library in Java

[亡魂溺海] 提交于 2019-12-20 06:08:47
问题 I trying to Automate the User Level Token Creation/Generation process (REST/Authorization Grant Code) using Apache OAuth Client 2.0 Library in Java. And below is the Code that am using which i got from https://cwiki.apache.org/confluence/display/OLTU/OAuth+2.0+Client+Quickstart, `/*Previous Codes & starting the below with Try/Catch*/ OAuthClientRequest request = OAuthClientRequest .authorizationLocation("Authorization URL") .setClientId("ClientID") .setRedirectURI("Redirect URL")

gmail api gives failedPrecondition error

浪尽此生 提交于 2019-12-19 04:13:44
问题 I can't get gmail api to work. I'm using server-to-server authentication with JWT. google-api-python-client==1.4.0 httplib2==0.9 oauth2client==1.4.7 pycrypto==2.6.1 My code looks like this. with open(CLIENT_SECRET_FILE) as f: data = json.loads(f.read()) private_key = data['private_key'] client_email = data['client_email'] credentials = SignedJwtAssertionCredentials(client_email, private_key, scope=OAUTH_SCOPE) http = credentials.authorize(http) gmail_service = build('gmail', 'v1', http=http)

The signing fingerprint you specified is already used by another Android OAuth2 client

巧了我就是萌 提交于 2019-12-17 04:06:12
问题 Some time ago I created an example project (lets call it "example project") with Oauth2 client id for android application in Google APIs console. I also added SHA1 fingerprint and package name (for example com.package.name). My mistake was that an application with same package name already existed. Now I need to create an Oauth2 client id for android application in the "valid project" with package name com.package.name and with SHA1 fingerprint which I added before. Obviously when I tried to

How to prevent unit testing from exiting when calling webbrowser.open()?

隐身守侯 提交于 2019-12-13 05:51:30
问题 I am developing unit test for code that use Google oauth2client.tools run_flow() . The problem is, this function will call Python webbrowser.open() , that will eventually (cmiiw), exit itself by calling sys.exit() . Therefore, even if I halt the code execution using threading.Event.wait() , it will eventually terminate, without continuing the rest of the unit testing code. I have read this SO answer that previously was my problem, but now I still faced with this webbrowser.open() issue. Any

Transfer ownership of Google Drive documents

喜你入骨 提交于 2019-12-11 08:35:26
问题 We develop application in C# which need to transfer ownership of all Google Drive documents related to the curtain domain to a single certain user without permission of original owner. We are using trial version of Google Apps business account. In principal, we need to do this: http://screencast.com/t/effVWLxL0Mr4 but in C# code. Accourding to the documentation, it is implemented in OAuth2 as superadmin functionality. https://support.google.com/a/answer/1247799?hl=en (1). But document was

User Registration & Login | SSO using Spring Security OAuth 2.0

淺唱寂寞╮ 提交于 2019-12-10 19:06:46
问题 I am trying to implement user registration and log in flow | SSO using Spring Security Oauth 2.0 and Google as the authentication provider. How should I initiate registration and login flow? What filter needs to be applied? In registration flow, I will needs user's details (name, email) that are part of successful authorization response, to be persisted in my local database. How do I handle that? What's the purpose of oauth2:client id="oauth2ClientFilter" ? This is how my application context

got 'invalid_grant' in oauth2 SignedJwtAssertionCredentials

☆樱花仙子☆ 提交于 2019-12-09 05:16:52
问题 I am trying to make an oauth2 access_token in a server-to-server JSON API scenario. But it failed with invalid_grant error, please help. from oauth2client.client import SignedJwtAssertionCredentials KEY_FILE = 'xxxxxxxxxxxx-privatekey.p12' with open(KEY_FILE, 'r') as fd: key = fd.read() SERVICE_ACCOUNT_EMAIL = 'xxxxxx.apps.googleusercontent.com' credentials = SignedJwtAssertionCredentials(SERVICE_ACCOUNT_EMAIL, key, scope="https://www.googleapis.com/auth/datastore https://www.googleapis.com