I'm building a little android app that will connect to a server.
My app would use a simple post to send a message to my server, and I'm using Google Cloud Messaging for the server to send a message to my app.
I built a registration page, an email confirmation and a connection page but now I wonder how to lock the communication between the server and the app.
This is the protocol I have in mind ( let's take the simple exemple of app to app message) :
- App send post infos to the server with self infos (like name and auth_token), destination user and the message
- Server search the apps which belong to the destination user and use
curl
to forward the message to GCM - GCM send the message to the destination apps
How can the server be sure that the name, auth_token etc the server receive are really from the sender ?