Update README
Project: http://git-wip-us.apache.org/repos/asf/couchdb-oauth/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-oauth/commit/e32d4909 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-oauth/tree/e32d4909 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-oauth/diff/e32d4909 Branch: refs/heads/import Commit: e32d49094ba77fbd416a89f1a0a50a4f55ec1d27 Parents: 2b001da Author: Tim Fletcher <[email protected]> Authored: Thu Jun 23 16:16:41 2011 +0100 Committer: Tim Fletcher <[email protected]> Committed: Thu Jun 23 16:16:41 2011 +0100 ---------------------------------------------------------------------- README.txt | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-oauth/blob/e32d4909/README.txt ---------------------------------------------------------------------- diff --git a/README.txt b/README.txt index 41b923a..d943634 100644 --- a/README.txt +++ b/README.txt @@ -10,18 +10,41 @@ Quick start (client usage): ... 2> RequestTokenURL = "http://term.ie/oauth/example/request_token.php". ... - 3> {ok, ResponseR} = oauth:get(RequestTokenURL, [], Consumer, "", ""). + 3> {ok, RequestTokenResponse} = oauth:get(RequestTokenURL, [], Consumer). ... - 4> ParamsR = oauth_http:response_params(ResponseR). + 4> RequestTokenParams = oauth:params_decode(RequestTokenResponse). ... - 5> TokenR = oauth:token(ParamsR). + 5> RequestToken = oauth:token(RequestTokenParams). ... - 6> TokenSecretR = oauth:token_secret(ParamsR). + 6> RequestTokenSecret = oauth:token_secret(RequestTokenParams). ... 7> AccessTokenURL = "http://term.ie/oauth/example/access_token.php". ... - 8> {ok, ResponseA} = oauth:get(AccessTokenURL, [], Consumer, TokenR, TokenSecretR). + 8> {ok, AccessTokenResponse} = oauth:get(AccessTokenURL, [], Consumer, RequestToken, RequestTokenSecret). ... + 9> AccessTokenParams = oauth:params_decode(AccessTokenResponse). + ... + 10> AccessToken = oauth:token(AccessTokenParams). + ... + 11> AccessTokenSecret = oauth:token_secret(AccessTokenParams). + ... + 12> URL = "http://term.ie/oauth/example/echo_api.php". + ... + 13> {ok, Response} = oauth:get(URL, [{"hello", "world"}], Consumer, AccessToken, AccessTokenSecret). + ... + 14> oauth:params_decode(Response). + ... + + +Consumer credentials are represented as follows: + + {Key::string(), Secret::string(), plaintext} + + {Key::string(), Secret::string(), hmac_sha1} + + {Key::string(), RSAPrivateKeyPath::string(), rsa_sha1} % client side + + {Key::string(), RSACertificatePath::string(), rsa_sha1} % server side The percent encoding/decoding implementations are based on those found in
