android - App-server communication protocol -
i'm building little android app connect server.
my app use simple post send message server, , i'm using google cloud messaging server send message app.
i built registration page, email confirmation , connection page wonder how lock communication between server , app.
this protocol have in mind ( let's take simple exemple of app app message) :
- app send post infos server self infos (like name , auth_token), destination user , message
- server search apps belong destination user , use
curl
forward message gcm - gcm send message destination apps
how can server sure name, auth_token etc server receive sender ?
let server generate authentication token when client doing registration , send client. server knows [client - token] mapping.
every time client wants send message, sends authentication token server can , check. client not have send or name, server should know this.
to prevent mitm attacks, use secure connection (https).
Comments
Post a Comment