0.0
Low commit activity in last 3 years
A long-lived project that still receives updates
Simple auth token generator/validator
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Snuffleupagus

A little simple.. auth token generator

Handles basic time-limited authentication token creation / validation

Uses OpenSSL AES with 256 bit CBC encryption

Snuffy

Installation

Include it in your Gemfile:

gem 'snuffleupagus'

Basic Usage

Token creation

snuffy = Snuffleupagus::AuthToken.new('p4ssw0rd')
snuffy.create_token context: 'my-context'
#=> "53616c7465645f5f25dba4d4a97b238c4560ab46ffdfb77b28ad3e7121ab1917"

Token validation

snuffy = Snuffleupagus::AuthToken.new('p4ssw0rd')
snuffy.token_valid? token: "53616c7465645f5f25dba4d4a97b238c4560ab46ffdfb77b28ad3e7121ab1917", context: 'my-context'
#=> true