Coder Social home page Coder Social logo

lzw120 / devise-token_authenticatable Goto Github PK

View Code? Open in Web Editor NEW

This project forked from baschtl/devise-token_authenticatable

0.0 2.0 0.0 751 KB

This gem provides the extracted Token Authenticatable module of devise. It enables the user to sign in via an authentication token. This token can be given via a query string or HTTP Basic Authentication.

License: MIT License

Ruby 95.98% HTML 4.02%

devise-token_authenticatable's Introduction

Devise::TokenAuthenticatable

Tag Build Status Code Climate

This gem provides the extracted Token Authenticatable module of devise. It includes the functionality that was also in version 3.1.2 of devise. With the inclusion of this module a user is able to sign in via an authentication token. This token can be given via a query string or HTTP Basic Authentication. See the hint below to understand which version of this gem supports which version of devise.

Use this gem as a starting point for your own token authentication mechanism for devise. Furthermore, if you need token authentication in connection with newer devise releases this gem might be an appropriate solution, too.

Installation

Add this line to your application's Gemfile:

gem 'devise-token_authenticatable'

And then execute:

$ bundle

Or install it yourself as:

$ gem install devise-token_authenticatable

Which version to use for which version of devise?

devise-token_authenticatable devise
0.1.0 ~> 3.2.0
0.2.0 ~> 3.3.0
0.3.0 ~> 3.4.0

Usage

Add :token_authenticatable to your devise model:

class User < ActiveRecord::Base
  devise :database_authenticatable, :token_authenticatable
end

The authentication key name used by this module defaults to auth_token. Use the following configuration (e.g., in a Rails initializer) to alter the name:

Devise::TokenAuthenticatable.setup do |config|
  config.token_authentication_key = :other_key_name
end

Documentation

For your convenience there is also a source code documentation.

Contributing

  1. Fork it.
  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.
  6. Get a thank you!

devise-token_authenticatable's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.