Android Team Documentation
This section explains how to create a software using ZKProto Rest Server.Due to the fact that ZKProto Server synchronizes data with ZKProto Server, project can be created which is related ZKProto Server.
ZKProto Server uses OAuth 2.0 Authorization Framework standard.Authentication is necessary for data manipulation.When authorization request comes,If ZKProto Rest Server validates the request,It replies as a json which has token_type,access_token,expires_in and refresh_token. Someone can manipulate data using this access_token.If access_token expires,new access_token should be gotten using refresh_token.
There are three ways to get token from server.Before explaining three methods, server waits a http request ,which contains five specified fields, for authorization request.These five fields are grant_type,client_id,client_secret,username and password. You can visit http://tools.ietf.org/html/rfc6749#section-4.3 for detailed information. You must make a “POST” request to the “/oauth2/access_token” url.
There are two ways to use access_token for accessing data.
When access_token is expired, you can get new tokens using refresh_token. Your request must include “grant_type”,“client_secret”,“client_id” and “refresh_token” key and values.