All Projects → tim → Erlang Oauth

tim / Erlang Oauth

Licence: mit
An Erlang OAuth 1.0 implementation

Programming Languages

erlang
1774 projects

Labels

Projects that are alternatives of or similar to Erlang Oauth

appleauth-net
AppleAuth.NET is a simple library that facilitates the implementation of "Sign in with Apple" for .NET applications.
Stars: ✭ 23 (-92.26%)
Mutual labels:  oauth
react-hooks-uikit-express-oauth-boiler-v2
A React/TypeScript fullstack boilerplate utilizing React hooks, using Express as backend, UIKit for frontend, MongoDB for storage & open-authenticator for OAuth.
Stars: ✭ 110 (-62.96%)
Mutual labels:  oauth
Teslajs
An Unofficial Tesla API library for NodeJS
Stars: ✭ 268 (-9.76%)
Mutual labels:  oauth
mern-google-login
Authentication flow for React & Express.js application using Google OAuth
Stars: ✭ 39 (-86.87%)
Mutual labels:  oauth
strimzi-kafka-oauth
OAuth2 support for Apache Kafka to work with many OAuth2 authorization servers
Stars: ✭ 71 (-76.09%)
Mutual labels:  oauth
Authenticationviewcontroller
A simple to use, standard interface for authenticating to oauth 2.0 protected endpoints via SFSafariViewController.
Stars: ✭ 254 (-14.48%)
Mutual labels:  oauth
lumen-api-skeleton
Lumen API skeleton with JWT to manager tokens, Socialite to OAuth Providers, MongoDB driver and Predis to Redis cache storage.
Stars: ✭ 22 (-92.59%)
Mutual labels:  oauth
Korio
Korio: Kotlin cORoutines I/O : Virtual File System + Async/Sync Streams + Async TCP Client/Server + WebSockets for Multiplatform Kotlin 1.3
Stars: ✭ 282 (-5.05%)
Mutual labels:  oauth
electron-oauth-helper
Easy to use helper library for OAuth1 and OAuth2.
Stars: ✭ 55 (-81.48%)
Mutual labels:  oauth
Gitlit
Platform to connect contributors and projects based on skill level and shared interests.
Stars: ✭ 265 (-10.77%)
Mutual labels:  oauth
yii2-rest-rbac
yii2 rbac yii2 rest RBAC Auth manager for Yii2 RESTful(YII2权限管理rbac--rest接口方式)
Stars: ✭ 79 (-73.4%)
Mutual labels:  oauth
oauth
Allow users to log in with GitHub, Twitter, Facebook, and more!
Stars: ✭ 21 (-92.93%)
Mutual labels:  oauth
Oauth
OAuth 1.0 implementation in go (golang).
Stars: ✭ 256 (-13.8%)
Mutual labels:  oauth
auth
Get started with the Android Authentication Framework!
Stars: ✭ 28 (-90.57%)
Mutual labels:  oauth
Oauthswift
Swift based OAuth library for iOS
Stars: ✭ 2,949 (+892.93%)
Mutual labels:  oauth
rust-oauthcli
Yet Another OAuth 1.0 Client Library for Rust
Stars: ✭ 15 (-94.95%)
Mutual labels:  oauth
oauth-provider-sample
A Spring Security OAuth provider, developed in my monograph about SSO and OAuth
Stars: ✭ 13 (-95.62%)
Mutual labels:  oauth
Oauth 1.0a
OAuth 1.0a Request Authorization for Node and Browser
Stars: ✭ 293 (-1.35%)
Mutual labels:  oauth
Maxkey
MaxKey is Single Sign On(SSO) System,Leading-Edge Enterprise-Class open source IAM(Identity and Access management) product.
Stars: ✭ 274 (-7.74%)
Mutual labels:  oauth
Passport
Laravel Passport provides OAuth2 server support to Laravel.
Stars: ✭ 2,936 (+888.55%)
Mutual labels:  oauth

erlang-oauth

An Erlang implementation of The OAuth 1.0 Protocol.

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

Erlang/OTP compatibility

Erlang/OTP 21 or greater.

Rebar3 compatibility

Add erlang-oauth as a dependency to your rebar.config file like this:

{deps, [
  {oauth, {git, "https://github.com/tim/erlang-oauth.git"}}
]}.

Consult the rebar docs for more information.

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, 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, oauth:uri_params_encode/1 or oauth:header_params_encode/1 to encode the parameters, and then assemble the request using your HTTP client of choice.

The percent encoding/decoding implementations are based on ibrowse

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

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].