問題タブ [google-cloud-endpoints]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - プロパティに基づいて Google アプリ エンジンが返すエンティティ
エンドポイントを使用して、Google App Engine データストアからエンティティ (ルーム) を返そうとしています。このメソッド (自動生成) は、データストア内のすべてのエンティティを返します。
これを編集して、プロパティ、文字列に基づいて 1 つのエンティティのみを返すようにします。そのため、文字列をパラメーターとして渡し、データストアで検索して返します。文字列は主キーにはなりません。
編集:
これを試してみましたが、まだ動作しません:
どんな助けでも感謝します。
ありがとう、
python - 挿入されたオブジェクトのIDを取得します
ユーザーをモデル化するエンドポイントを次のように定義しています。IDでユーザーに問い合わせることができます。しかし、ユーザーを挿入するときにそのIDを取得するにはどうすればよいですか?私のクライアントはJavaで書かれていますが、Pythonと生成されたJavaクライアントライブラリの両方でIDを取得する方法を知りたいです。
python - エンドポイント ユーザーをメールでクエリする
ユーザーの電子メールでエンドポイントを照会できるメソッドを作成しようとしています。私が以下でやっていることよりも良い方法はありますか?おそらく1つまたは0つのレコードのみを返すもの。
google-app-engine - ユーザーオブジェクトを取得するapp-engineエンドポイントメソッド
ユーザーオブジェクトを必要とするエンドポイントメソッドがあります。私は次のことをしますか?ユーザーに使ってもらえるので少し変な感じがしますendpoints.get_current_user()
その場合、FriendListRequestは次のようになります
オブジェクトが必要な理由はUser、ユーザーの電子メールを使用して、そのユーザーの友達を照会および検索する必要があるためです。
java - GoogleCloudエンドポイントとの「セッション」
この質問は、私がこの概念について明確であることを確認するためだけのものです。
私の知る限り、Google Cloud EndpointsはGoogleによるRESTサービスの実装の一種であるため、「セッション」データをメモリに保持することはできません。したがって、次のようになります。
- ユーザーは、リクエストごとに認証データを送信する必要があります。
- 後で使用するすべてのデータを永続化する必要があります。つまり、受信するAPIリクエストごとに、データストアにアクセスし、何かを実行して、データを再度保存する必要があります。
これは正しいです?もしそうなら、これは実際にパフォーマンスの面で良いですか?
android - What is the best way to auth, identify and store delicate information about users?
With the purpose of learning about endpoints I'm building an app called "Where Are You?". The app lets users request the location of other users. The idea is that it does so by letting the user select a contact, lookup the contact by phone number in my endpoint. If found it means that the contact have the app and GCM is sent requesting the location. If the contact isn't found a SMS is sent with an url which will request the location through a browser, perform a http post of said location and have the server GCM it back to the person requesting the location.
I need to authenticate users of the app and store phone numbers of several contacts as well as users of the app. As of now I'll mainly focus on the server side of things.
How can I archive the above in a safe manner?
So far I'm enabling OAuth 2.0 for my API and passing the user_required=True as argument to my Model.method decorator. Resulting in the following code:
But the above code only requires a valid gmail account. I'm thinking something where you only can access a user if you already have the phone number? Which would be the case if I limit the response fields on the get method to exclude the phone number... unless someone decides to brute force the service. Suggestions? Comments?
From this I gather that I can configure my endpoint to only accept requests from my apps. Is that right? And if so, couldn't someone extract the need information from the apk or modify it to perform... evil? :)
Update:
A makes a request for B's location
Querys endpoint by phone number if not found simply send a request per SMS if found... go to 2.
Request is forwarded to GAE app
This is done by inserting a Location endpoint whoes id is a UUID and sends a GCM to B about the request
GAE app verifies that A's secret ID is on B's whitelist
There is no whitelist and the secret id is the UUID so this step is eliminated
The app then queries for B's location
If B decides to grant access to it's location B simply updates the Location endpoint based on the UUID
Once the app retrieves this information, it then verifies that it is only sending this information to the user identified by A's secret ID
When B updates it's location GAE sends a GCM to A informing about the update
The info is then sent securely to A's client
Done! GCM and SMS (and HTTPS) can be considered secure... right?
Update: GCM isn't secure... but does it really matter that much?
google-app-engine - 複数の応答メッセージを使用するGoogleCloudエンドポイントメソッド
私はグーグルがaMaleResponseMessageまたはのいずれかを返すことができる必要があるメソッドを指定することができFemaleResponseMessageます。それを指定する方法はありますか?
もちろん、スーパーメッセージクラスを宣言するオプションもあります。たとえば、またはのいずれかPersonResponseMessageをラップします。しかし、上記のスニペットに似たものはありますか?MaleResponseMessageFemaleResponseMessage
編集:
自分の提案を実行しようとして、行き詰まりました。2つのメッセージタイプに共通するのはリクエストだけです。まったく同じリクエストフィールド(追加のブール値をfemale=true/false含む)PersonRequest。MaleResponseMessageとにFemaleResponseMessageは共通のフィールドがありません。だから私は@bossylobsterが示すように、1つのエンドポイントメソッドを使用しています。
応答には、次のようなものが必要です
何をチェックすればいいのかわかりません???。isinstanceまず、またはについて考えましtypeた。しかし、どうすればよいでしょうか。以下は機能しますか?
google-app-engine - 複数のフィールドを解決する Google クラウド エンドポイント RequestMessage
クラウド エンドポイントの ResponseMessage は、私には簡単に思えます。応答メッセージ クラスがある場合
それを呼び出すのは簡単です
しかし、RequestMessage複数のフィールドがある場合はどうでしょうか? サービス エンドポイント メソッドから得られるのはrequestオブジェクトだけです。どのフィールドがどこにあるのかを知るにはどうすればよいですか?
要求はどのようにフィールドと一致するので、私がそうするsitting_tableときにユーザーのものを取得することはありませんrequest.nameか?
android - クラウド エンドポイント ライブラリの生成に失敗しました
これに何時間も取り組んできましたが、エンドポイント ライブラリの生成に失敗しました。https://developers.google.com/eclipse/docs/endpoints-addentitiesのチュートリアルで定義されているエンティティ クラスのエンドポイント クラスを生成しました。ただし、エンドポイント ライブラリの生成は、以下の例外で失敗します。
google-app-engine - FieldListを使用した呼び出し元からのprotorpc読み取りリスト
呼び出し元からリストを読み取り、いくつかの作業を行ってから応答を返すことになっているWebサービスがあります。
次のARequestMessageクラスは機能しますか?
FieldList構造内またはコンテキスト内での使用法についてはよくわかりません。それに応じてコードを少し含めてください。