All Projects → erlangpack → erlang-oauth

erlangpack / erlang-oauth

Licence: MIT license
An Erlang OAuth 1.0 implementation

Programming Languages

erlang
1774 projects
Makefile
30231 projects

Projects that are alternatives of or similar to erlang-oauth

Instagram
[READ ONLY] Subtree split of the SocialiteProviders/Instagram Provider (see SocialiteProviders/Providers)
Stars: ✭ 34 (-88.59%)
Mutual labels:  oauth, oauth1
VKontakte
[READ ONLY] Subtree split of the SocialiteProviders/VKontakte Provider (see SocialiteProviders/Providers)
Stars: ✭ 82 (-72.48%)
Mutual labels:  oauth, oauth1
Slack
[READ ONLY] Subtree split of the SocialiteProviders/Slack Provider (see SocialiteProviders/Providers)
Stars: ✭ 11 (-96.31%)
Mutual labels:  oauth, oauth1
Weibo
[READ ONLY] Subtree split of the SocialiteProviders/Weibo Provider (see SocialiteProviders/Providers)
Stars: ✭ 37 (-87.58%)
Mutual labels:  oauth, oauth1
Oauthswift
Swift based OAuth library for iOS
Stars: ✭ 2,949 (+889.6%)
Mutual labels:  oauth, oauth1
Spotify
[READ ONLY] Subtree split of the SocialiteProviders/Spotify Provider (see SocialiteProviders/Providers)
Stars: ✭ 13 (-95.64%)
Mutual labels:  oauth, oauth1
Twitch
[READ ONLY] Subtree split of the SocialiteProviders/Twitch Provider (see SocialiteProviders/Providers)
Stars: ✭ 20 (-93.29%)
Mutual labels:  oauth, oauth1
oauther
OAuth 1.0 for Elixir
Stars: ✭ 64 (-78.52%)
Mutual labels:  oauth, oauth1
oauth-provider-sample
A Spring Security OAuth provider, developed in my monograph about SSO and OAuth
Stars: ✭ 13 (-95.64%)
Mutual labels:  oauth, oauth1
electron-oauth-helper
Easy to use helper library for OAuth1 and OAuth2.
Stars: ✭ 55 (-81.54%)
Mutual labels:  oauth, oauth1
Oauthlib
A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
Stars: ✭ 2,323 (+679.53%)
Mutual labels:  oauth, oauth1
Twitter
[READ ONLY] Subtree split of the SocialiteProviders/Twitter Provider (see SocialiteProviders/Providers)
Stars: ✭ 21 (-92.95%)
Mutual labels:  oauth, oauth1
socialify
Socialify - Social Login and support OAuth2 for WordPress based on HybridAuth made by @uptimizt with Love :)
Stars: ✭ 20 (-93.29%)
Mutual labels:  oauth
docusign-esign-node-client
The Official DocuSign Node.js Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
Stars: ✭ 129 (-56.71%)
Mutual labels:  oauth
sonar-auth-gitlab-plugin
Use GitLab OAuth login in SonarQube login page
Stars: ✭ 97 (-67.45%)
Mutual labels:  oauth
ohauth
Pure-browser OAuth for CORS-supporting sites like OpenStreetMap
Stars: ✭ 19 (-93.62%)
Mutual labels:  oauth1
yii2-league-oauth2-server
Yii 2.0 implementation of PHP league OAuth2 server interfaces
Stars: ✭ 29 (-90.27%)
Mutual labels:  oauth
micro-service-practice
OpenStack+Docker+RestAPI+OAuth/HMAC+RabbitMQ/ZMQ+OpenResty/HAProxy/Nginx/APIGateway+Bootstrap/AngularJS+Ansible+K8S/Mesos/Marathon构建/探索微服务最佳实践。
Stars: ✭ 25 (-91.61%)
Mutual labels:  oauth
ueberauth slack
Slack OAuth2 Strategy for Überauth
Stars: ✭ 23 (-92.28%)
Mutual labels:  oauth
laravel-api-guide
Laravel 5 project creation guide for REST APIs (needs an update!!)
Stars: ✭ 18 (-93.96%)
Mutual labels:  oauth

Build Status Hex.pm version Hex.pm Downloads Hex.pm Documentation Erlang Versions License

erlang-oauth

An Erlang implementation of The OAuth 1.0 Protocol.

There are functions for

  • generating signatures (client side),
  • verifying signatures (server side),
  • some convenience functions for making OAuth HTTP requests (client side).

Usage

Erlang-oauth is on Hex, you can use the package by adding it into your rebar.config:

{deps, [
    {oauth, "2.1.0"}
]}.

Erlang/OTP compatibility

Erlang/OTP 21 or greater.

Quick start (client usage)

$ erl -make
Recompile: src/oauth
$ 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, RequestTokenResponse} = oauth:get(RequestTokenURL, [], Consumer).
...
4> RequestTokenParams = oauth:params_decode(RequestTokenResponse).
...
5> RequestToken = oauth:token(RequestTokenParams).
...
6> RequestTokenSecret = oauth:token_secret(RequestTokenParams).
...
7> AccessTokenURL = "http://term.ie/oauth/example/access_token.php".
...
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).
...

OAuth consumer representation

Consumers are represented using tuples:

{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

Other notes

This implementation should be compatible with the signature algorithms presented in RFC5849 - The OAuth 1.0 Protocol, and OAuth Core 1.0 Revision A. It is not intended to cover OAuth 2.0.

This is not a "plug and play" server implementation. In order to implement OAuth correctly as a provider you have more work to do: token storage, nonce and timestamp verification etc.

This is not a "bells and whistles" HTTP client. If you need fine grained control over your HTTP requests or you prefer to use something other than inets/httpc then you will need to assemble the requests yourself. Use oauth:sign/6 to generate a list of signed OAuth parameters, and then either oauth:uri_params_encode/1 or oauth:header_params_encode/1 to encode the signed parameters.

The percent encoding/decoding implementations are based on ibrowse

License

This project is licensed under the terms of the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].