tokenable-ruby 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40e8d5ec3402eabc0468d0ddc40eccc571b7745719b5101da223d01c504e43ee
4
- data.tar.gz: 950d44d72882ffd8a376837ce1150bb81a5c149ce31f45cc2ba90efa3b0d325d
3
+ metadata.gz: a63844e9ccbdab546defaf4e6e9a3d8e1447a96dd1db93678181fc490c7210eb
4
+ data.tar.gz: e0f6a5cfcd3276d0809fe9c5293d632ff3a6bbf26c06bb698a6b24833987a460
5
5
  SHA512:
6
- metadata.gz: a55f04fce6b1aabbc31fc0306793d7680636b1ed29e5397c33e1124e650ccff36e8eb28baaa72c6b3d1cd55785a030aaeed861ac986c4cfbfbe9aec63191650f
7
- data.tar.gz: c0b41d1071a8212a09d50fddbd5e75b677e0d96864cf940b79057df16ce31767debf00e4168bab415134c81a428c8e2f029436a18f079817c99a7b975715de5d
6
+ metadata.gz: e18044255f88cadbe625ab99e2ea00d1c8bf92a6d6e512f00024a93121f010efcdf644b4bd4de3c63a6030d88feb97340cf124c49b73e99a8af7af618309fd93
7
+ data.tar.gz: d24acf6f7d796c6520efb10f97a7af9593a32d5d89428472454761665b7f3b75876d92e3f8a2907d833e94066d10742705b24a4fabdb2613b476a7196670542c
@@ -11,6 +11,6 @@ jobs:
11
11
  uses: ruby/setup-ruby@v1
12
12
  with:
13
13
  ruby-version: 2.7
14
- - run: gem install bundler -v 2.2.4
15
- - run: bundle install
14
+ bundler-cache: true
15
+
16
16
  - run: bundle exec rubocop
@@ -1,9 +1,9 @@
1
- name: Test
1
+ name: Tests
2
2
 
3
3
  on: push
4
4
 
5
5
  jobs:
6
- test:
6
+ rspec:
7
7
  strategy:
8
8
  fail-fast: false
9
9
  matrix:
@@ -12,10 +12,16 @@ jobs:
12
12
  runs-on: ${{ matrix.os }}
13
13
  steps:
14
14
  - uses: actions/checkout@v2
15
+
15
16
  - name: Set up Ruby
16
17
  uses: ruby/setup-ruby@v1
17
18
  with:
18
19
  ruby-version: ${{ matrix.ruby }}
19
- - run: gem install bundler -v 2.2.4
20
- - run: bundle install
20
+ bundler-cache: true
21
+
22
+ - run: cd spec/dummy && bundle install
23
+ - run: cd spec/dummy && bundle exec rails db:create db:migrate
24
+ env:
25
+ RAILS_ENV: test
26
+
21
27
  - run: bundle exec rspec
data/.gitignore CHANGED
@@ -7,3 +7,11 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
  Gemfile.lock
10
+ /vendor
11
+
12
+ spec/dummy/log
13
+ spec/dummy/tmp
14
+ spec/dummy/db/*.sqlite3
15
+ spec/dummy/config/master.key
16
+
17
+ *.gem
@@ -1,5 +1,18 @@
1
+ require:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+
1
5
  AllCops:
6
+ NewCops: enable
2
7
  TargetRubyVersion: 2.5
8
+ Exclude:
9
+ - "spec/dummy/**/*"
10
+ - "vendor/**/*"
11
+ - "tmp/**/*"
12
+
13
+ Naming/FileName:
14
+ Exclude:
15
+ - 'lib/tokenable-ruby.rb'
3
16
 
4
17
  Style/Documentation:
5
18
  Enabled: false
@@ -20,3 +33,45 @@ Style/TrailingCommaInHashLiteral:
20
33
 
21
34
  Layout/LineLength:
22
35
  Max: 150
36
+ Exclude:
37
+ - "spec/**/*"
38
+
39
+ Lint/EmptyBlock:
40
+ Enabled: false
41
+
42
+ Metrics/AbcSize:
43
+ Enabled: false
44
+
45
+ Metrics/MethodLength:
46
+ Enabled: false
47
+
48
+ Metrics/BlockLength:
49
+ Exclude:
50
+ - "spec/**/*"
51
+
52
+ Style/ClassVars:
53
+ Enabled: false
54
+
55
+ RSpec/MultipleExpectations:
56
+ Enabled: false
57
+
58
+ RSpec/ImplicitBlockExpectation:
59
+ Enabled: false
60
+
61
+ RSpec/DescribedClass:
62
+ Enabled: false
63
+
64
+ RSpec/StubbedMock:
65
+ Enabled: false
66
+
67
+ RSpec/MessageSpies:
68
+ Enabled: false
69
+
70
+ RSpec/NamedSubject:
71
+ Enabled: false
72
+
73
+ RSpec/ExampleLength:
74
+ Enabled: false
75
+
76
+ RSpec/FilePath:
77
+ Enabled: false
data/Gemfile CHANGED
@@ -4,7 +4,22 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- gem 'rake', '~> 13.0'
7
+ gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
8
8
 
9
- gem 'rspec', '~> 3.10'
10
- gem 'rubocop', '~> 0.80'
9
+ gem 'rake'
10
+
11
+ group :test do
12
+ gem 'bcrypt'
13
+ gem 'codecov', require: false, git: 'https://github.com/codecov/codecov-ruby.git'
14
+ gem 'database_cleaner-active_record', '1.8.0'
15
+ gem 'generator_spec', '0.9.4'
16
+ gem 'rails'
17
+ gem 'rails-controller-testing', '1.0.5'
18
+ gem 'rspec-rails', '4.0.2'
19
+ gem 'rubocop', '1.8.1'
20
+ gem 'rubocop-rails', '2.9.1'
21
+ gem 'rubocop-rake', '0.5.1'
22
+ gem 'rubocop-rspec', '2.1.0'
23
+ gem 'simplecov', '~> 0.2'
24
+ gem 'sqlite3', '1.4.2'
25
+ end
data/README.md CHANGED
@@ -1,17 +1,20 @@
1
1
  # Tokenable
2
2
 
3
- ![Test](https://github.com/tokenable/tokenable-ruby/workflows/Test/badge.svg)
3
+ ![Tests](https://github.com/tokenable/tokenable-ruby/workflows/Tests/badge.svg)
4
+ [![codecov](https://codecov.io/gh/tokenable/tokenable-ruby/branch/main/graph/badge.svg?token=URF456H8RI)](https://codecov.io/gh/tokenable/tokenable-ruby)
5
+ ![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)
6
+ ![Project Status: WIP – Development is in progress](https://www.repostatus.org/badges/latest/wip.svg)
4
7
 
5
- Tokenable is a gem for Rails to enable the ability for API applications to provide Authentication.
8
+ Tokenable is a Rails gem that allows API-only applications a way to authenticate users. This can be helpful when building Single Page Applications, or Mobile Applications.
6
9
 
7
- This allows you to provide authentication to mobile apps, or SPAs with ease.
10
+ Simply send a login request to the authentication endpoint, and Tokenable will return a token. This token can then be used to access your API, and any authenticated endpoints.
8
11
 
9
12
  ## Installation
10
13
 
11
14
  Add this line to your application's Gemfile:
12
15
 
13
16
  ```ruby
14
- gem 'tokenable'
17
+ gem 'tokenable-ruby', git: 'https://github.com/tokenable/tokenable-ruby.git', branch: 'main'
15
18
  ```
16
19
 
17
20
  And then execute:
@@ -22,103 +25,78 @@ bundle install
22
25
 
23
26
  ## Usage
24
27
 
25
- In your `config/routes.rb`, please add:
28
+ Once you have the gem installed, lets get it setup:
26
29
 
27
- ```ruby
28
- mount Tokenable::Engine => '/api/auth'
30
+ ```bash
31
+ rails generate tokenable:install User --strategy=devise
29
32
  ```
30
33
 
31
- And in your `User` model, please add an Auth Strategy. For example, if you are using `has_secure_password`, then you could use:
32
-
33
- ```ruby
34
- class User < ApplicationRecord
35
- include Tokenable::Strategies::SecurePassword
34
+ We make it easier for you, by adding out of the box support for some auth libraries. You can pick from the following options for `--strategy`, or leave it empty for a [custom strategy](https://github.com/tokenable/tokenable-ruby/wiki/Create-your-own-statergy):
36
35
 
37
- has_secure_password
38
- end
39
- ```
36
+ - [devise](https://github.com/heartcombo/devise)
37
+ - [sorcery](https://github.com/Sorcery/sorcery)
38
+ - [secure_password](https://api.rubyonrails.org/classes/ActiveModel/SecurePassword/ClassMethods.html)
40
39
 
41
- You can chose from:
40
+ This will add a route, the configuration file at `config/initializers/tokenable.rb`, and add the required includes to your User model. There are no migrations to run in the default configuration.
42
41
 
43
- - `Tokenable::Strategies::SecurePassword`
44
- - `Tokenable::Strategies::Devise`
42
+ ### Controllers
45
43
 
46
- You can also create your own stragery. This is as simple as creating a method on the User object.
44
+ To limit access to your controllers/endpoints, you will need to include Tokenable.
47
45
 
48
46
  ```ruby
49
- def self.from_tokenable_params(params)
50
- user = User.find_by(something: params[:something])
51
- return nil unless user.present?
47
+ class SomeController < ApplicationController
48
+ include Tokenable::Authable
52
49
 
53
- return nil unless user.password_valid?(params[:password])
54
- user
50
+ before_action :require_tokenable_user!
55
51
  end
56
52
  ```
57
53
 
54
+ After you have done this, the following methods are available:
55
+
56
+ - `current_user`
57
+ - `user_signed_in?`
58
+
58
59
  ### Invalidate Tokens
59
60
 
60
- If you want to be able to invalidate tokens from the server, then you can add `Tokenable::Verifier`.
61
+ Sometime you want to be able to force a user (or users) to login again. You can do this by adding the Verifier. To install this, run:
61
62
 
62
- ```ruby
63
- class User < ApplicationRecord
64
- include Tokenable::Verifier
65
- end
63
+ ```
64
+ rails generate tokenable:verifier User
66
65
  ```
67
66
 
68
- And running the following migration:
67
+ And then run your migrations:
69
68
 
70
- ```bash
71
- rails g migration AddTokenableVerifierToUsers tokenable_verifier:string
69
+ ```
70
+ rails db:migrate
72
71
  ```
73
72
 
74
73
  You can now invalidate all tokens by calling `user.invalidate_tokens!`.
75
74
 
76
75
  ### Token Expiry
77
76
 
78
- By default, tokens will live forever. If you want to change this, you can set a config option (see below for how to set that up).
77
+ By default, tokens expire after 7 days. If you want to change this, you can set a config option.
79
78
 
80
79
  ```ruby
80
+ # Expire in 7 days (default)
81
81
  Tokenable::Config.lifespan = 7.days
82
- ```
83
82
 
84
- ### Configuration Options
85
-
86
- Tokenable works out of the box, with no config required, however you can tweak the settings, by creating `config/initializers/tokenable.rb` file.
87
-
88
- ```ruby
89
- # The secret used to create these tokens. This is then used to verify the
90
- # token is valid. Note: Tokens are not encrypted, and container the user_id.
91
- # Default: Rails.application.secret_key_base
92
- Tokenable::Config.secret = 'a-256-bit-string'
83
+ # Tokens will never expire
84
+ Tokenable::Config.lifespan = nil
93
85
  ```
94
86
 
95
- ### Example Usage
87
+ ### Example Use Cases
96
88
 
97
- Once you have this setup, you can login. For example, you could login using `axios` in JavaScript:
89
+ Once you have this setup, you will then be able to integrate your Rails API with a mobile app, single page application, or any other type of system. Here are some example use cases:
98
90
 
99
- ```js
100
- const { data } = await axios.post("https://example.com/api/auth", {
101
- email: "email@example.com",
102
- password: "coolpassword123",
103
- });
104
-
105
- const token = data.data.token;
106
- const user_id = data.data.user_id;
107
- ```
108
-
109
- You then use this token in all future API requests:
110
-
111
- ```js
112
- const { data } = await axios.get(`https://example.com/api/user/${user_id}`, {
113
- headers: { Authorization: `Bearer ${token}` },
114
- });
115
- ```
91
+ - [Using Tokenable with Nuxt.js Auth](https://github.com/tokenable/tokenable-ruby/wiki/Integration-with-Nuxt.js-Auth)
92
+ - [Using Tokenable with Axios](https://github.com/tokenable/tokenable-ruby/wiki/Integration-with-Axios)
93
+ - [Using Tokenable with Curl](https://github.com/tokenable/tokenable-ruby/wiki/Curl-Example)
116
94
 
117
95
  ## Development
118
96
 
119
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
97
+ After checking out the repo, run `bin/setup` to install dependencies.
120
98
 
121
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
99
+ Then, run `bundle exec rspec` to run the tests.
122
100
 
123
101
  ## Contributing
124
102
 
@@ -0,0 +1,2 @@
1
+ Rails.application.routes.draw do
2
+ end
@@ -0,0 +1,12 @@
1
+ # How long should the token be valid for?
2
+ # After this time, it will return Tokenable::Unauthorized
3
+ # You can set this to nil for tokens to never expire
4
+ Tokenable::Config.lifespan = 7.days
5
+
6
+ # The class in which your User resides.
7
+ Tokenable::Config.user_class = <%= name %>
8
+
9
+ # The secret used to create these tokens. This is then used to verify the
10
+ # token is valid. Note: Tokens are not encrypted, and container the user_id.
11
+ # You can change this to any 256-bit string
12
+ Tokenable::Config.secret = Rails.application.secret_key_base
@@ -0,0 +1,5 @@
1
+ class AddTokenableVerifierTo<%= table_name.camelize %> < ActiveRecord::Migration<%= migration_version %>
2
+ def change
3
+ add_column :<%= table_name %>, :tokenable_verifier, :string
4
+ end
5
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/generators/active_record'
4
+
5
+ module Tokenable
6
+ module Generators
7
+ class InstallGenerator < Rails::Generators::NamedBase
8
+ source_root File.expand_path('../templates', __dir__)
9
+ class_option :strategy, type: :string
10
+
11
+ def install_config
12
+ template 'tokenable.rb.erb', 'config/initializers/tokenable.rb'
13
+ template 'routes.rb.erb', 'config/routes.rb' unless routes_file_exists?
14
+ route "mount Tokenable::Engine => '/api/auth'"
15
+ end
16
+
17
+ def setup_strategy
18
+ unless options.strategy
19
+ say_status :skip, 'strategy (none provided)', :yellow
20
+ return
21
+ end
22
+
23
+ if options.strategy.in?(list_of_strategies)
24
+ invoke 'active_record:model', [name], migration: false unless model_exists?
25
+
26
+ strategy_class = options.strategy.classify
27
+ model_path = "app/models/#{file_name}.rb"
28
+ already_injected = File.open(File.join(destination_root, model_path)).grep(/Tokenable::Strategies/).any?
29
+
30
+ if already_injected
31
+ say_status :skip, 'a strategy is already in this model', :yellow
32
+ else
33
+ inject_into_file model_path, " include Tokenable::Strategies::#{strategy_class}\n", after: " < ApplicationRecord\n"
34
+ end
35
+ else
36
+ say_status :failure, "stargery not found (#{options.strategy}). Available: #{list_of_strategies.join(", ")}", :red
37
+ end
38
+ end
39
+
40
+ private
41
+
42
+ def model_exists?
43
+ File.exist?(File.join(destination_root, "app/models/#{file_name}.rb"))
44
+ end
45
+
46
+ def routes_file_exists?
47
+ File.exist?(File.join(destination_root, 'config/routes.rb'))
48
+ end
49
+
50
+ def list_of_strategies
51
+ Dir.entries(File.expand_path('../../tokenable/strategies', __dir__))
52
+ .reject { |f| File.directory?(f) }
53
+ .map { |f| File.basename(f, File.extname(f)) }
54
+ .compact
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/generators/active_record'
4
+
5
+ module Tokenable
6
+ module Generators
7
+ class VerifierGenerator < ActiveRecord::Generators::Base
8
+ source_root File.expand_path('../templates', __dir__)
9
+
10
+ def generate_model
11
+ invoke 'active_record:model', [name], migration: false unless model_exists? && behavior == :invoke
12
+ end
13
+
14
+ def add_to_model
15
+ model_path = "app/models/#{file_name}.rb"
16
+ already_injected = File.open(File.join(destination_root, model_path)).grep(/Tokenable::Verifier/).any?
17
+
18
+ if already_injected
19
+ say_status :skip, 'verifier is already in this model', :yellow
20
+ else
21
+ inject_into_file "app/models/#{file_name}.rb", " include Tokenable::Verifier\n", after: " < ApplicationRecord\n"
22
+ end
23
+ end
24
+
25
+ def add_migration
26
+ migration_template 'verifier_migration.rb.erb', "db/migrate/add_tokenable_verifier_to_#{table_name}.rb"
27
+ end
28
+
29
+ private
30
+
31
+ def model_exists?
32
+ File.exist?(File.join(destination_root, "app/models/#{file_name}.rb"))
33
+ end
34
+
35
+ def migration_version
36
+ "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" if Rails::VERSION::MAJOR >= 5
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'tokenable'
@@ -14,7 +14,7 @@ module Tokenable
14
14
  end
15
15
 
16
16
  def current_user
17
- @current_user ||= user_class.find(jwt_user_id)
17
+ @current_user ||= user_class.find_by(id: jwt_user_id)
18
18
  rescue Tokenable::Unauthorized
19
19
  nil
20
20
  end
@@ -42,7 +42,7 @@ module Tokenable
42
42
  end
43
43
 
44
44
  def token_from_header
45
- request.authorization.to_s.split(' ').last
45
+ request.authorization.to_s.split.last
46
46
  end
47
47
 
48
48
  def token_from_user(user)
@@ -56,6 +56,8 @@ module Tokenable
56
56
 
57
57
  jwt_data[:data][:verifier] = user.current_verifier if verifier_enabled?
58
58
 
59
+ raise Tokenable::Unauthorized, 'No secret key was provided' unless jwt_secret
60
+
59
61
  JWT.encode(jwt_data, jwt_secret, 'HS256')
60
62
  end
61
63
 
@@ -3,8 +3,9 @@
3
3
  module Tokenable
4
4
  class Config
5
5
  # How long should the token last before it expires?
6
- # E.G: Tokenable::Config.lifespan = 7.days
7
- mattr_accessor :lifespan, default: nil
6
+ # E.G: Tokenable::Config.lifespan = 14.days
7
+ # You could set this to nil to disable expiring keys
8
+ mattr_writer :lifespan, default: -> { 7.days }
8
9
 
9
10
  # The secret used by JWT to encode the Token.
10
11
  # We default to Rails secret_key_base
@@ -4,9 +4,13 @@ module Tokenable
4
4
  class TokensController < ::ActionController::API
5
5
  include Authable
6
6
 
7
+ rescue_from 'Tokenable::Unauthorized' do
8
+ render json: { error: 'Login failed, please try again.' }, status: 401
9
+ end
10
+
7
11
  def create
8
- user = User.from_tokenable_params(params)
9
- raise Tokenable::Unauthorized unless user
12
+ user = Tokenable::Config.user_class.from_tokenable_params(params)
13
+ raise Tokenable::Unauthorized, 'No user returned by strategy' unless user
10
14
 
11
15
  response = {
12
16
  data: {
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative 'controllers/tokens_controller'
4
4
  require_relative 'strategies/devise'
5
+ require_relative 'strategies/sorcery'
5
6
  require_relative 'strategies/secure_password'
6
7
 
7
8
  module Tokenable
@@ -9,7 +9,7 @@ module Tokenable
9
9
  def from_tokenable_params(params)
10
10
  email, password = parse_auth_params(params)
11
11
 
12
- user = User.find_by(email: email)
12
+ user = Tokenable::Config.user_class.find_by(email: email)
13
13
  return nil unless user
14
14
 
15
15
  return nil unless user.valid_password?(password)
@@ -21,8 +21,8 @@ module Tokenable
21
21
 
22
22
  def parse_auth_params(params)
23
23
  [
24
- params.require(:email),
25
- params.require(:password),
24
+ params[:email],
25
+ params[:password],
26
26
  ]
27
27
  end
28
28
  end
@@ -9,7 +9,7 @@ module Tokenable
9
9
  def from_tokenable_params(params)
10
10
  email, password = parse_auth_params(params)
11
11
 
12
- user = User.find_by(email: email)
12
+ user = Tokenable::Config.user_class.find_by(email: email)
13
13
  return nil unless user
14
14
 
15
15
  return nil unless user.authenticate(password)
@@ -21,8 +21,8 @@ module Tokenable
21
21
 
22
22
  def parse_auth_params(params)
23
23
  [
24
- params.require(:email),
25
- params.require(:password),
24
+ params[:email],
25
+ params[:password],
26
26
  ]
27
27
  end
28
28
  end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tokenable
4
+ module Strategies
5
+ module Sorcery
6
+ extend ActiveSupport::Concern
7
+
8
+ class_methods do
9
+ def from_tokenable_params(params)
10
+ email, password = parse_auth_params(params)
11
+
12
+ user = Tokenable::Config.user_class.find_by(email: email)
13
+ return nil unless user
14
+
15
+ return nil unless user.valid_password?(password)
16
+
17
+ user
18
+ end
19
+
20
+ private
21
+
22
+ def parse_auth_params(params)
23
+ [
24
+ params[:email],
25
+ params[:password],
26
+ ]
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tokenable
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tokenable-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Qualie
8
8
  - Scott Robertson
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-01-17 00:00:00.000000000 Z
12
+ date: 2021-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jwt
@@ -51,7 +51,7 @@ dependencies:
51
51
  - - "<"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '6.2'
54
- description:
54
+ description:
55
55
  email:
56
56
  - marc@marcqualie.com
57
57
  - scott@scottrobertson.me
@@ -61,7 +61,7 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - ".github/workflows/publish.yml"
63
63
  - ".github/workflows/rubocop.yml"
64
- - ".github/workflows/test.yml"
64
+ - ".github/workflows/tests.yml"
65
65
  - ".gitignore"
66
66
  - ".rspec"
67
67
  - ".rubocop.yml"
@@ -73,6 +73,12 @@ files:
73
73
  - bin/console
74
74
  - bin/setup
75
75
  - config/routes.rb
76
+ - lib/generators/templates/routes.rb.erb
77
+ - lib/generators/templates/tokenable.rb.erb
78
+ - lib/generators/templates/verifier_migration.rb.erb
79
+ - lib/generators/tokenable/install_generator.rb
80
+ - lib/generators/tokenable/verifier_generator.rb
81
+ - lib/tokenable-ruby.rb
76
82
  - lib/tokenable.rb
77
83
  - lib/tokenable/authable.rb
78
84
  - lib/tokenable/config.rb
@@ -81,6 +87,7 @@ files:
81
87
  - lib/tokenable/railtie.rb
82
88
  - lib/tokenable/strategies/devise.rb
83
89
  - lib/tokenable/strategies/secure_password.rb
90
+ - lib/tokenable/strategies/sorcery.rb
84
91
  - lib/tokenable/verifier.rb
85
92
  - lib/tokenable/version.rb
86
93
  - tokenable-ruby.gemspec
@@ -91,7 +98,7 @@ metadata:
91
98
  homepage_uri: https://github.com/tokenable/tokenable-ruby
92
99
  source_code_uri: https://github.com/tokenable/tokenable-ruby
93
100
  changelog_uri: https://github.com/tokenable/tokenable-ruby/releases
94
- post_install_message:
101
+ post_install_message:
95
102
  rdoc_options: []
96
103
  require_paths:
97
104
  - lib
@@ -106,8 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
113
  - !ruby/object:Gem::Version
107
114
  version: '0'
108
115
  requirements: []
109
- rubygems_version: 3.1.4
110
- signing_key:
116
+ rubygems_version: 3.0.3
117
+ signing_key:
111
118
  specification_version: 4
112
119
  summary: JWT authentication for Rails API's
113
120
  test_files: []