google-cloud-endpoints

Google Cloud endpoints with google Identity tool kit

孤人 提交于 2019-12-06 04:22:41
My overall goal is to create a mobile and web app that allows for multiple identity providers (google, Facebook, email/password) and uses a google cloud endpoint (python) that preform a user authorization check. I am trying to figure out the best method of doing this. Is it possible to use the google identity tool kit to preform the user authorization check within the endpoint that I want to secure? I cant seem to figure out how I would go about doing this. As far as I know I would not be able to call the endpoints.get_current_user() to validate the user as it will only work with google+

Google Cloud Endpoints linking iOS client issues

最后都变了- 提交于 2019-12-06 04:11:28
This problem arises from the fact I don't completely understand static libraries in iOS and the docs from google seem to be a little sparse. I am trying to use Google Cloud Endpoints for my mobile backend. I generate the .m and .h files for my client library. Then I created a new project(OwnItApi), dragged the libGTLTouchStaticLib.a static library from GTL.proj to this new project. Then I add the generated files .m and .h files to this project. I add all the .m files to the Compile Sources and then I the header files Copy Files. In the Build Settings I add "-ObjC -all_load" to the Other Linker

Google Cloud Endpoints custom authentication with App Engine Flexible (Node.js)

喜夏-厌秋 提交于 2019-12-06 04:08:00
The Google Cloud Endpoints documentation provides this specification for a custom security definition in the Extensible Service Proxy configuration file: securityDefinitions: your_custom_auth_id: authorizationUrl: "" flow: "implicit" type: "oauth2" # The value below should be unique x-google-issuer: "issuer of the token" x-google-jwks_uri: "url to the public key" # Optional. Replace YOUR-CLIENT-ID with your client ID x-google-audiences: "YOUR-CLIENT-ID" The documentation on how to implement this is very sparse for App Engine Flexible . Does anyone have an example of how to set this up or can

How to use GoogleApiClient to provide credentials for cloud endpoint client

本小妞迷上赌 提交于 2019-12-06 03:49:48
问题 Ok, using the GoogleApiClient of Google Play Services I have let the user select an account (if multiple) and confirm oauth permissions for my Android app. I need this for leader boards and a few other things. But I'm also using an AppEngine backend and need to authenticate the user with that. To do so I need to pass in the emailAccount with which to authenticate. Prior to integrating Google Play Services I handled account selection manually, so I always had access to the emailAccount

Why don't Google Cloud Endpoints Support Simple Object Return Types?

*爱你&永不变心* 提交于 2019-12-06 02:43:31
Most of my methods return Strings, Integers, Booleans, etc and I bet that holds for 99% of developers, sure we sometimes return complex objects, arrays, etc. but most of the time something much simpler will do. Why would Cloud Endpoints not support this? Thanks! So there are workarounds for returning "simple object types", in java you could return a StringResponse which would look something like this: class StringResponse { String value; setter, getter... etc } Because they are communicating with various programming languages that may or may not support the same data types. This is why most

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

懵懂的女人 提交于 2019-12-06 01:40:02
问题 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

Content-length error in google cloud endpoints testing

ぐ巨炮叔叔 提交于 2019-12-06 00:23:42
问题 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

Using endpoints-proto-datastore, how do you pass attributes to a method that are not contained in the EndpointsModel

北城以北 提交于 2019-12-05 22:35:13
I am trying to pass attributes into an API call that are not contained in my EndpointsModel . For example, say I have the following model: class MyModel(EndpointsModel): attr1 = ndb.StringProperty() Then assume I want to pass in attr2 as a parameter, but I don't want attr2 to be used as a filter nor do I want it to be stored in the model. I simply want to pass in some string, retrieve it inside of the method and use it to perform some business logic. The documentation describes the query_fields parameter for specifying the fields you want to pass into the method, but these appear to be coupled

Upload File to Google Cloud Storage via appengine

心不动则不痛 提交于 2019-12-05 22:27:47
I am trying to upload a file to Google Cloud Storage. My Servlet code is public class UploadFile extends HttpServlet { private final String BUCKET = "XXXXXXXXX"; private boolean isMultipart; private String filePath; private int maxFileSize = 5 * 1024 * 1024; private int maxMemSize = 5 * 1024 * 1024; private File file ; public void init( ){ // Get the file location where it would be stored. filePath = getServletContext().getInitParameter("file-upload"); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { // Check that we

Hot to return a pure array of objects from AppEngine endpoint?

冷暖自知 提交于 2019-12-05 21:47:15
I am doing AppEngine endpoints for a RESTFul backend in AppEngine. I use AngujarJS on the client side, managing server data with ngResource. My issue: I am not able to return a pure array from AppEngine Endpoint. I tried this: @ApiMethod( name = "mpscorerapi.getAllResults", path = "/tournament/{tournamentId}/result/" httpMethod = HttpMethod.GET ) public List<SimpleResult> getAllResults(@Named("tournamentId") Long tournamentId) throws NotFoundException { ... } Although this gets the data from the server down to the client, it does not build an array of "SimpleResult" objects, but a single