Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Yhd OAuth2 Strategy for OmniAuth 1.0.
Read Yhd OAuth2 docs for more details: http://open.yhd.com/opendoc.do
Add to your Gemfile
:
gem 'omniauth-yhd-oauth2'
Then bundle install
.
Or install it yourself as:
$ gem install omniauth-yhd-oauth2
OmniAuth::Strategies::Yhd
is simply a Rack middleware. Read the OmniAuth 1.0 docs for detailed instructions: https://github.com/intridea/omniauth.
Here's a quick example, adding the middleware to a Rails app in config/initializers/omniauth.rb
:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :yhd, ENV['YHD_KEY'], ENV['YHD_SECRET']
end
Here's an example Authentication Hash available in request.env['omniauth.auth']
:
{
"provider" => "yhd",
"uid" => xxxxx,
"info" => {
"nickname" => "xxxxx旗舰店"
},
"credentials" => {
"token" => "f841875xxxxxxxxx81509d",
"expires_at" => xxxxxxxxx,
"expires" => true
},
"extra" => {
"raw_info" => {
"storeId" => xxxxxxxxx,
"storeName" => "xxxxxxxx旗舰店",
"storeAddress" => "http://shop.yhd.com/html/xxxxx",
"storeOpenTime" => "2xxx-xx-03 17:xx:13",
"storeCategoryCode" => xxx,
"storeNickName" => ""
}
}
}
PS. Built and tested on MRI Ruby 1.9.3
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that omniauth-yhd-oauth2 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.