google-cloud-endpoints

Google OAuth - Keeping the Client ID Secret

不打扰是莪最后的温柔 提交于 2019-12-04 07:36:53
When using OAuth in the Google Cloud Endpoints JavaScript client, how do you preserve the secrecy of the client ID? How to implement 0Auth in the Google Cloud Endpoints JavaScript client is detailed here . In the code snippet below the client ID is passed as a parameter to the OAuth method. gapi.auth.authorize({client_id: CLIENT_ID, scope: SCOPES, immediate: mode}, callback); Since the end user will receive the script file in clear text, regardless of the use of HTTPS, how would you avoid handing the client ID over to every user you serve? After all, it would be rather simple to comb the

Use authorized Google Cloud Endpoints with Google Sign in

£可爱£侵袭症+ 提交于 2019-12-04 07:18:41
I have an app that uses Google Cloud Endpoints. Some methods need authorization so I followed this tutorial. This requires the GET_ACCOUNTS permissions. I am updating the app to work with runtime permissions. I do not like to request permission to read contacts, but GET_ACCOUNTS is in the same group. Because of this I am looking to use authorization without GET_ACCOUNTS permission. I think that Google Sign In could work but I am unable to find a way to use the result from Google Sign In. This is the code used to create the object to make the calls to the endpoint: Helloworld.Builder helloWorld

Debugging Google Web Application projects with Google Cloud Endpoints in Eclipse

坚强是说给别人听的谎言 提交于 2019-12-04 06:05:16
问题 My iOS app uses a Java-based server and communicates with it using Google Cloud Endpoints. Normally the server listens on https://myservice.appspot.com/_ah/api/rpc . How can I debug my server code? After I run it with Debug As | Web Application inside Eclipse and change its URL to https://localhost:8888/_ah/api/rpc the client cannot connect. I don't think it's a firewall issue because URLs with localhost:8888 work for other client-server pairs. So does one need to take any special steps for

Content-length error in google cloud endpoints testing

北战南征 提交于 2019-12-04 05:39:06
I get the following error whenever I want to test a 404 HTTP error path in my code: AssertionError: Content-Length is different from actual app_iter length (512!=60) I have created a minimal sample that triggers this behavior: import unittest import endpoints from protorpc import remote from protorpc.message_types import VoidMessage import webtest @endpoints.api(name='test', version='v1') class HelloWorld(remote.Service): @endpoints.method(VoidMessage, VoidMessage, path='test_path', http_method='POST', name='test_name') def test(self, request): raise endpoints.NotFoundException("Not found")

Error when I am deploying my google cloud endpoints python application in localhost with App Engine SDK

岁酱吖の 提交于 2019-12-04 05:23:04
I use the google cloud endpoints configuration as https://cloud.google.com/appengine/docs/python/endpoints/test_deploy exactly, I run google chrome with flag --user-data-dir=temp --unsafely-treat-insecure-origin-as-secure=http://localhost:8080 as https://developers.google.com/explorer-help/#hitting_local_api then, Google Chrome say me You are using an unsupported command-line (--unsafely-treat-insecure-origin-as-secure) flag. Stability and security will suffer If I visit _http://localhost:8080/_ah/api/explorer then I get the error: The API you are exploring is hosted over HTTP, which can cause

com.google.api.config.ServiceConfigSupplier - Failed to fetch default config version for service (only on localhost)

隐身守侯 提交于 2019-12-04 05:12:38
I'm using Cloud Endpoints Frameworks (2.0.1) for Java as part of my final year project and have been relatively successful with it so far. I don't have any problems when deploying to my appspot.com domain, however, I am running into some problems when deploying locally. (Any references to my-project-id in the following code blocks are aliases for my actual google cloud project id) I have a valid openapi descriptor (openapi.json) of an annotated @API class which I am deploying to cloud endpoints using "gcloud service-management deploy openapi.json". The command returns successfully: Service

Google Cloud Endpoint keeps throwing “unexpected end of stream” exception

。_饼干妹妹 提交于 2019-12-04 04:46:32
Does anyone know why Google Cloud Endpoint keeps throwing unexpected end of stream exception even before my app engine instance is actually reached? I keep getting the following error when I call my endpoint. In most places the error shows after every other call; in rare others it's consistent. 05-06 18:32:28.335: W/System.err(11783): java.io.IOException: unexpected end of stream 05-06 18:32:28.343: W/System.err(11783): at libcore.net.http.FixedLengthOutputStream.close(FixedLengthOutputStream.java:58) 05-06 18:32:28.343: W/System.err(11783): at com.google.api.client.http.javanet.NetHttpRequest

Method interference in Google Cloud Endpoints with Google Eclipse Plugin

六眼飞鱼酱① 提交于 2019-12-04 02:44:05
I am experiencing a strange behavior while generating endpoints using the Google Appengine Eclipse plugin. I have an endpoint class with over 20 endpoint methods. When I first tried generating the endpoints for android I get the error Generating Cloud Endpoint has encountered errors and is not complete By way of troubleshooting, I comment out all the methods to find the culprits. What I found is a bit baffling. After uncommenting the 16th method, I get the error again. There are two methods that are interfering with each other! If I comment out one or the other the endpoint is generated fine.

Error:Execution failed for task ':backend:appengineEndpointsGetClientLibs

白昼怎懂夜的黑 提交于 2019-12-04 02:20:10
When adding a Google Cloud Endpoint backend to a Android app using the Google App Engine Java Module Template , two classes (amongst other things) are added to the project. We are then encouraged to modify these classes to our own requirements. So, I decided to delete the model class (MyBean) and the endpoint class (MyEndpoint) and replace them with my own classes. When I tried to rebuild/clean the project, I get the error message: Error:Execution failed for task ':backend:appengineEndpointsGetClientLibs'. There was an error running endpoints command get-client-lib: <package-name>.MyEndpoint I

Send image from Android client to AppEngine Cloud Endpoint

ぐ巨炮叔叔 提交于 2019-12-03 21:47:52
I am developing an Android applicaiton with AppEngine backend. I am creating the server part with Google Cloud Endpoints in Java. My problem is that I cannot send a Bitmap from the client to the server. I used the answer from this question but even if the client part does not seem to have any problems at all, the server part does not receive the data at all. I also think this solution might be a bit complicated and that it might work a different, easier way, however this is my first time implementing a server and first time sending a picture to it so I accept any good tips on this. Thanks!