
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
This gem creates a S2S authentication header to make S2S API requests. S2S header format: Bearer
Add this line to your application's Gemfile:
gem 's2s-auth'
And then execute:
$ bundle
Or install it yourself as:
$ gem install s2s-auth
You need to setup the gem by setting four values:
require "s2s/auth"
# setup
S2S::Auth.setup({secret: "this is my secret",
app: "test",
salt: "f7b5763636f4c1f3ff4bd444eacccca2",
sign_salt: "95d87b990cc104124017ad70550edcfd22b8e89465338254e0b608592a9aac29"
})
# generate http authorization header
S2S::Auth.header
# => {:Authorization=>"Bearer bUcweFFKcUpCcWxPQTczcjZTMm1yYkxBL3RDUFk1L2xKVVY4VjU2R1EwbkExTE00eUI0RkxmNzFwbWM4WS8waS0tQ1hiUWVMZ0FwVVZCOGVqQVc5cFJGQT09--afa1f7353e789cc8fc1a332b0c355fb07a7efb03"}
# generate just the token
S2S::Auth.generate_token
# => "TWRsNE16ZzR3dG9qVjcwKzlEc1B4R0h4UGwyTHcyVTlRZ0szV0EybE1jV3R6VjF1WHpPSnNDcjRaRVdIeGFlYS0tT3FqQktYbmU2cVpvVzdTZzM3ditMdz09--09144f0202ef708622ac8d778cc062f5d62c22a3"
# parse the token
S2S::Auth.parse_token(S2S::Auth.generate_token)
# => {"app"=>"test", "ts"=>"2014-02-11T06:33:39Z"}
FAQs
Unknown package
We found that s2s-auth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.