S2S::Auth
This gem creates a S2S authentication header to make S2S API requests.
S2S header format: Bearer
Installation
Add this line to your application's Gemfile:
gem 's2s-auth'
And then execute:
$ bundle
Or install it yourself as:
$ gem install s2s-auth
Usage
You need to setup the gem by setting four values:
- app name
- secret
- encryption salt
- signature salt
require "s2s/auth"
S2S::Auth.setup({secret: "this is my secret",
app: "test",
salt: "f7b5763636f4c1f3ff4bd444eacccca2",
sign_salt: "95d87b990cc104124017ad70550edcfd22b8e89465338254e0b608592a9aac29"
})
S2S::Auth.header
S2S::Auth.generate_token
S2S::Auth.parse_token(S2S::Auth.generate_token)