Skip to content
This repository was archived by the owner on Jul 2, 2018. It is now read-only.
/ erlang-oauth Public archive
forked from erlangpack/erlang-oauth

An Erlang OAuth 1.0 implementation

License

Notifications You must be signed in to change notification settings

inaka/erlang-oauth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

136 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An Erlang OAuth implementation.

Quick start (client usage):

  $ make
  ...
  $ erl -pa ebin -s crypto -s inets
  ...
  1> Consumer = {"key", "secret", hmac_sha1}.
  ...
  2> RequestTokenURL = "http://term.ie/oauth/example/request_token.php".
  ...
  3> {ok, ResponseR} = oauth:get(RequestTokenURL, [], Consumer, "", "").
  ...
  4> ParamsR = oauth_http:response_params(ResponseR).
  ...
  5> TokenR = oauth:token(ParamsR).
  ...
  6> TokenSecretR = oauth:token_secret(ParamsR).
  ...
  7> AccessTokenURL = "http://term.ie/oauth/example/access_token.php".
  ...
  8> {ok, ResponseA} = oauth:get(AccessTokenURL, [], Consumer, TokenR, TokenSecretR).
  ...


The percent encoding/decoding implementations are based on those found in
the ibrowse library, written by Chandrashekhar Mullaparthi.

Example client/server code is at http://github.com/tim/erlang-oauth-examples.

Unit tests are at http://github.com/tim/erlang-oauth-tests.

Erlang/OTP R14B or greater is required for RSA-SHA1.

About

An Erlang OAuth 1.0 implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Erlang 100.0%