Popularity
1.3
Declining
Activity
0.0
Stable
4
3
0

Monthly Downloads: 0
Programming language: Elixir
License: MIT License
Tags: Authentication    
Latest version: v0.1.0

mojoauth alternatives and similar packages

Based on the "Authentication" category.
Alternatively, view mojoauth alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of mojoauth or a related project?

Add another 'Authentication' Package

README

Build Status

mojoauth

MojoAuth is a set of standard approaches to cross-app authentication based on Hash-based Message Authentication Codes (HMAC), inspired by "A REST API For Access To TURN Services".

Dependencies

  • elixir
  • mix

Building

Simply run mix compile.

Usage

# Generate a shared secret
iex(1)> secret = MojoAuth.create_secret
"y662KxTm1X4DvVCml+witUgwdJkNbR013JvFFUy6ZxuWozjHwND6vlIREoylJBh/9TiuSMpBqluNekWqN7kaPg=="

# Create temporary credentials
iex(2)> credentials = MojoAuth.create_credentials(id: "foobar", secret: secret)
[username: "1413748361:foobar", password: "sJgD0PLv892CUSfp1HL2td5NEeM="]

# Test credentials
iex(3)> MojoAuth.test_credentials(credentials, secret)
{:ok, "foobar"}
iex(4)> MojoAuth.test_credentials([username: "1412629132:foobar", password: "wrongpassword"], secret)
{:invalid, "foobar"}

# 1 day later
iex(5)> MojoAuth.test_credentials(credentials, secret)
{:expired, "foobar"}

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request