Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
omniauth-classiclaw-oauth2
Advanced tools
数据生产平台OAuth授权
Add to your Gemfile:
gem 'omniauth-classiclaw-oauth2', git: 'ssh://git@git.classiclaw.com:2020/data_platform/omniauth-classiclaw-oauth2.git'
Then bundle install
OmniAuth::Strategies::Classiclaw 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 :classiclaw, ENV['PLATFORM_APPID'], ENV['PLATFORM_SECRET'], client_options: {
site: ENV['PLATFORM_URL']
}
end
you can set up redirect_uri in omniauth.rb as following:
provider :classiclaw, ENV['PLATFORM_APPID'], ENV['PLATFORM_SECRET'], client_options: {
site: ENV['PLATFORM_URL']
}
{
:provider => 'classiclaw',
:uid => '1234567890',
:info => {
:name => '张三',
:email => 'tester@t.com',
:court_id => 215,
:dlbs => 'tester',
:rybs => 'tester'
},
:extra => {
:raw_info => {
'uid' => '1234567890',
'name' => '张三',
'court_id' => 215, # 默认曲阳县人民法院
'dlbs' => 'tester',
'rybs' => 'tester'
}
}
}
Add a callback route to config/routes.rb
get '/auth/:provider/callback', to: 'sessions#create'
Create the SessionsController
class SessionsController < ApplicationController
def create
@user = User(request.env['omniauth.auth'])
session['current_user_id'] = @user.id
redirect_to root_path
end
end
For your views you can login using:
<%= link_to "Sign in with Data Platform", '/auth/classiclaw' %>
FAQs
Unknown package
We found that omniauth-classiclaw-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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.