peatio/peatio — pull request #347 by janx (2014-11-10 02:29:11+00:00)
Title: Oauth

Implement OAuth authorization.

* Use standard OAuth flows to get access token and refresh token.
* The returned access token type is 'urn:peatio:api:v2:token', which is a Peatio defined type. The token has a simple format ":". User can extract APIv2 access_key/secret_key simply by splitting access token: `access_token.split(':')`.
* The access token will auto expire in 1 week, user will get ExpiredAccessKeyError (code: 2010) when user uses expired token. Then user can use the refresh token to get new access token.
* Refresh token MUST NOT be saved in client side.