A little simple.. auth token generator
Handles basic time-limited authentication token creation / validation
Uses OpenSSL AES with 256 bit CBC encryption
Include it in your Gemfile:
gem 'snuffleupagus'
snuffy = Snuffleupagus::AuthToken.new('p4ssw0rd')
snuffy.create_token context: 'my-context'
#=> "53616c7465645f5f25dba4d4a97b238c4560ab46ffdfb77b28ad3e7121ab1917"
snuffy = Snuffleupagus::AuthToken.new('p4ssw0rd')
snuffy.token_valid? token: "53616c7465645f5f25dba4d4a97b238c4560ab46ffdfb77b28ad3e7121ab1917", context: 'my-context'
#=> true