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

basic_api_auth

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basic_api_auth

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

BasicApiAuth

A basic SHA1 hashkey based authentication implementation.

Installation

Add this line to your application's Gemfile:

gem 'basic_api_auth'

And then execute:

$ bundle

Or install it yourself as:

$ gem install basic_api_auth

Usage

create a yml file with an authentication key as follows: in config/basic_api_auth_key.yml api_key: 'API-KEY-HERE'

Generation of Hashkey

The hashkey sent to the api call should be generated by following these steps

  1. Order all the parameters of the cal in alphabetic order of its keys
  2. Convert them into a string representation such that, if the hash is of type {name: 'snarf'} then its string representation would be "name=snarf"
  3. Append the api key given to you to the string after adding a "&" so the resulting string will become "name=snarf&API-KEY-HERE"
  4. Use SHA1 to generate a hashkey from the resulting string
  5. Append the generated hashkey as a paramter of the API call

Contributing

  1. Fork it ( http://github.com//basic_api_auth/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 30 Jul 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

  • 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