验证我的"应用"以谷歌的云终端不是一个"用户QUOT; [英] Authenticate my "app" to Google cloud endpoints not a "user"

查看:119
本文介绍了验证我的"应用"以谷歌的云终端不是一个"用户QUOT;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么荫试图做的是验证我的Andr​​oid应用程序的谷歌云终端。 基本上端点应该只让我的Andr​​oid应用程序访问的方法而已。

What Iam trying to do is to authenticate my android app to the Google cloud endpoint. Basically the endpoints should only allow my android app to access the methods and nothing else.

我已经做了这些事情 -

I have done these things -

  1. 使用谷歌的云主机在Eclipse中我的SHA1值创建一个客户端ID。

  1. Create a client id using my SHA1 value in Eclipse in the google cloud console.

我的端点项目创建了谷歌云控制台的​​Web客户端ID

Create a web client id in the Google cloud console for my endpoint project

添加这两种客户端ID在每个端点中提到的@Api。

Add both these client id's in the "@Api" mentioned on each endpoint.

在端点方法添加一个额外的用户的参数。

Add an extra "user" parameter in the endpoint methods.

重新生成和部署后端到云中。

Regenerate and Deploy the backend to the cloud.

但是,当IAM运行该用户始终是未来的空。我在我束手无策试图找到一个合适的工作方法做的这一切。

But when iam running this the "user" is always coming as "null". I'm at my wits end trying to find a proper working method for doing all this.

我搜索很多论坛,但没有合适的答案的任何地方。

I've searched many forums but no proper answers anywhere.

下面是另外一个类似的帖子<一href="http://stackoverflow.com/questions/17873993/restrict-access-to-google-cloud-endpoints-to-android-app">Restrict访问谷歌的云终端到Android应用

Here's another similar post Restrict access to google cloud endpoints to Android app

这是荫使用参考 - https://developers.google.com/appengine/docs/java/endpoints/auth

This is the reference Iam using - https://developers.google.com/appengine/docs/java/endpoints/auth

有没有人在此之前,这样做呢?我的主要目标是不允许未经身份验证的应用程序和外界访问端点,出于显而易见的安全原因。我不希望使用的最终用户的身份验证,因为我要保持我的应用程序非常简单。

Has anyone here done this before ? My main goal is to not allow unauthenticated apps and outside world to access the endpoints, for obvious security reasons. I don't want to use end-user based authentication since I want to keep my app very simple.

推荐答案

您需要调用验证客户端上,则可能是库您使用的是将注入用户的信息。

You need to call authenticate on the client, then possibly the library you're using will 'inject' the user information.

这篇关于验证我的&QUOT;应用&QUOT;以谷歌的云终端不是一个&QUOT;用户QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆