Re: GoogleCredentials.get_application_default()

56 views
Skip to first unread message
Message has been deleted

Ryan (Cloud Platform Support)

unread,
Jul 1, 2015, 2:38:21 PM7/1/15
to google-a...@googlegroups.com, octavi...@mobii.com.br
Salutations Octavio, 

These kind of questions are best asked on Stack Overflow. I would recommend posting there.

On Wednesday, July 1, 2015 at 1:54:41 PM UTC-4, Octavio Turra wrote:
First of all, I've been making an App Engine microservice architecture with Python, then I found out that I must have something to authenticate my requests. 

As I'm using endpoints, I decided to use its AUTH_LEVEL configuration.

I've been using get_application_default() to authenticate one service A to another service B, but it isn't working.

When I tried to connect my Service A to Service B, the token id comes empty in my service A, also I've got an id_token verification error: 

Token is not an id_token (Wrong number of segments)

This message showed up in my service B.

- My scope for apiclient.discovery is 'https://www.googleapis.com/auth/userinfo.email', nevertheless it was deprecated. I don't know what is the alternative.

- I've been using discovery.build to make my requests, thus http whas authenticated this way:

credentials = oauth2client.GoogleCredentials.get_application_default()
    if credentials.create_scoped_required():
        credentials = credentials.create_scoped(scopes)
    credentials.authorize(http)

- I've tried with AppAssertionCredentials, but the answer was the same

Can someone help me?
Reply all
Reply to author
Forward
0 new messages