google-cloud-endpoints

AngularJS Load controllers only when parent controller finishes async call

断了今生、忘了曾经 提交于 2019-12-07 03:05:57
问题 I am building a website with AngularJS and Google Cloudendpoint The architecture is as follow. I have : 1 - a MainCtrl that manages the overall site display (top menus, modals, etc...) <body ng-controller="MainCtrl" ng-cloak main-directive> ... <div ng-view></div> ... </body> 2 - ng-view with a controller for each page that all have a their own controllers managed by the $routeprovider main.js .config([ '$routeProvider', '$locationProvider', '$httpProvider', function($routeProvider,

How to verify ownership of Google Cloud Endpoints service URL?

孤人 提交于 2019-12-07 02:11:39
问题 I already set up Google Cloud Endpoints project and can invoke http/https requests. Endpoints gives me MY_API.endpoints.MY_PROJECT.cloud.goog domain name that I can use. I'm using gRPC Cloud Endpoints with HTTP/JSON to gRPC transcoding feature. It is deployed on Google Kubernetes Engine (deployment yaml script attached at the end). When I'm trying to create push subscription with that URL I getting next error: "The supplied HTTP URL is not registered in the subscription's parent project (url=

endpoints.ServiceException subclass returning 400 status code instead of 409

做~自己de王妃 提交于 2019-12-07 02:05:41
问题 In the Cloud Endpoints documentation for exception handling, it is recommended to subclass the endpoints.ServiceException class to provide a custom http_status for 409 Conflict errors. This answer to another question indicates that some of the supported status codes get mapped by Google's infrastructure to other status codes, but 409 isn't one of the mapped status codes. Using the ConflictException class from the documentation: import endpoints import httplib class ConflictException(endpoints

How to send Firebase Cloud Message from Google App Engine App

◇◆丶佛笑我妖孽 提交于 2019-12-07 01:54:04
问题 How can you send a Firebase Cloud Message from a Google App Engine/Cloud Endpoints App? Android Studio automatically generates the following code to send a Google Cloud Message. While you can use the same code to send a FCM, you can't set the "notification" or "priority" or anything like that which the new FCM uses. Is there a gradle import for this or an example of how to use Firebase Cloud Messaging inside of an App Engine app so you can easily do things like set the message, notification,

How to cache the response in google cloud endpoint?

与世无争的帅哥 提交于 2019-12-06 16:15:47
I'm making an android app which uses google cloud endpoints as the backend. So I'm making request from the app. I want to cache the response of these requests in memory as well as storage. I want to cache the response on the phone, so that I don't have to make unnecessary repeated network requests. I searched the internet for some inbuilt solution but couldn't find anything like that in the api provided by google. There's a total of about 2MB data that I want to cache. This data is spread over 20 end point requests. What are my best options to implement such a cache? Sanket Berde You can

how to make google endpoints inaccessible from the web?

为君一笑 提交于 2019-12-06 16:15:20
问题 I have an Android app that has access to a set of APIs through Google Endpoints. The problem is that the same APIs are accessible from the web through https://your-app-id.appspot.com/_ah/api/explorer, and I don't want this to happen. That is, I want the datastore to be accessible (and modifiable) only from mobile devices. Is there a simple way to do this? I had a look at enpoint authentification and did not completely understand that (I'm still new to all of this...), so I wondered if there

How to do authentication check in Python library from Google Cloud Endpoints on GAE standard

前提是你 提交于 2019-12-06 15:21:40
I'm trying to implement service-to-service authentication to Google Cloud Endpoints API using Google Service account, but get the following error. Cannot decode and verify the auth token. The backend will not be able to retrieve user info (.../lib/endpoints_management/control/wsgi.py:596) Traceback (most recent call last): File ".../lib/endpoints_management/control/wsgi.py", line 593, in __call__ service_name) File ".../lib/endpoints_management/auth/tokens.py", line 81, in authenticate error) UnauthenticatedException: (u'Cannot decode the auth token', UnicodeDecodeError('ascii', '\xc9\xad\xbd'

GAE User API with OAuth2

泄露秘密 提交于 2019-12-06 15:06:20
Inside my servlets, this is how I authenticate user UserService userservice=UserServiceFactory.getUserService(); User user = userservice.getCurrentUser(); if(user == null){ response.redirect(userservice.createLoginURL("../userhome")); } More recently, in the same project I used Google Cloud Endpoints with authentication to access data using a JS client. The JS client authorizes using Oauth gapi.auth.authorize(...); Although they belong to the same App Engine Project and share the same credentials, the servlet and JS client ask the user to sign in independent of each other - as if they were two

Caching of Google Cloud Endpoints?

夙愿已清 提交于 2019-12-06 14:32:58
Will requests to Cloud Endpoints get cached? The official docs are a little light on this matter. The docs read: Cloud Endpoints uses the distributed Extensible Service Proxy to provide low latency and high performance for serving even the most demanding APIs. [...] and can be used with Google App Engine, Google Container Engine, Google Compute Engine or Kubernetes. A 'distributed extensible service proxy' makes me think the Endpoint is distributed to the edge nodes for faster responses, but the docs don't specifically state this. We can use Cloud CDN to cache requests from GAE, Compute and

Returning an empty list on Google App Engine behaves differently on the dev server and when deployed

烂漫一生 提交于 2019-12-06 13:30:44
I've created an endpoint that returns a list of items. When the list is empty, I was expecting to see an empty list in the JSON, but the list field was instead omitted. That's not what happens on the dev server. Ex: @ApiMethod(name = "udinic", path = "udinic") public List<UdinicResponse> getUdinics() { List<UdinicResponse> list = new ArrayList<>(); UdinicResponse res = new UdinicResponse(); res.bla = "sds"; list.add(res); return list; } static class UdinicResponse { String bla; public String getBla() { return bla; } public void setBla(String bla) { this.bla = bla; } } When I run this on the