Socket
Book a DemoInstallSign in
Socket

warden-token

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

warden-token

0.2.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Warden Token Strategy

Introduction

This is a simple token authentication strategy for Warden. It's not very secure and I wouldn't use it long-term in production, but if you want a simple API-like means of authenticating a user with each request, this is a decent way to do it.

It makes a couple of assumptions on parameter naming and such, but I plan to eventually include configuration capabilities, such that you can create an initiailizer or something and override the parameter names with custom ones.

Setup

Pretty easy if you use bundler:

gem "warden-token"

Or if you use RubyGems:

gem install warden-token

Then require "warden/strategies/token" in your project code (or your Gemfile) and add it to the Warden strategies collection as such:

Warden::Strategies.add(:token, Warden::Strategies::Token)

Now you may authenticate using the strategy name :token, but you can change that part to whatever you'd like.

FAQs

Package last updated on 25 Sep 2014

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.