Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

userbin

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

userbin

  • 1.7.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Ruby SDK for Userbin

Build Status Gem Version Dependency Status Coverage Status

Userbin adds real-time monitoring of your authentication stack, instantly notifying you and your users on potential account hijacks.

Installation

Add the userbin gem to your Gemfile

gem 'userbin'

Load and configure the library with your Userbin API secret in an initializer or similar.

Userbin.api_secret = 'YOUR_API_SECRET'

A Userbin client instance will automatically be made available as userbin in your Rails, Sinatra or Padrino controllers.

Tracking security events

track lets you record the security-related actions your users perform. The more actions you track, the more accurate Userbin is in identifying fraudsters.

When you have access to a logged in user, send along the same user identifier as when you initiated Userbin.js.

userbin.track(
  user_id: user.id,
  name: 'login.succeeded')

If you don't have access to a logged in user just omit user_id, typically when tracking failed logins.

userbin.track(name: 'login.failed')

All the available events are:

  • login.succeeded
  • login.failed
  • logout.succeeded

Configuration

Userbin.configure do |config|
  # Same as setting it through Userbin.api_secret
  config.api_secret = 'secret'

  # Userbin::RequestError is raised when timing out (default: 30.0)
  config.request_timeout = 2.0
end

FAQs

Package last updated on 23 Jan 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc