cow_auth 0.5.3 → 0.7.1

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: 1455b64dcd0206bf8ffd9a4539f4de942952ede5dad80c60b0f86186814735fc
4
- data.tar.gz: fc0e8de3a619e761b9fcdc525622d8056f20f939e60592064ada6f76adbcf9a3
3
+ metadata.gz: '08bc282855f351e65f119c983bd016fe5d1e1bd25e12ba949022ef07c04df8a6'
4
+ data.tar.gz: 7fc1a92f50a815fa7f534f24129f032bbaa0f741d2118977a03ff50daf341bb4
5
5
  SHA512:
6
- metadata.gz: 5d2fc711916cb332f6279cee78459af32a0610264a95ab4899db92d693d6083acbef67491c2ed296e102f8423b5e0ebd50cabbc749ce3cd61eaa06cdd4bed0d4
7
- data.tar.gz: 964cf902670e4f7298b9ba2593e675d7fd00699424c79bc38e6cafb67072b39bb5462e336e1408dbaa7868ab1a70a086952c54220a874cfcf858949610b3d8db
6
+ metadata.gz: 1b499e57597af0995b6aabd9f9184f666b102d32ca6e5cbb067ca7ee2dc6649d0f67cb223fb1fcb97c25f2ca4adaca836e76d1185016612fa0e276b328dc5e60
7
+ data.tar.gz: 8a1ac0b95249ab9f286554cb735feaef539c8bb70beb0ce180a12e4e40283e6ab4a27eaa472506cffc03f6791aaf3ac9c85d7737f0892628e8a45588b946d68c
data/.gitignore CHANGED
@@ -6,4 +6,3 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
- *.gem
data/.travis.yml CHANGED
@@ -1,5 +1,6 @@
1
- sudo: false
1
+ ---
2
2
  language: ruby
3
+ cache: bundler
3
4
  rvm:
4
- - 2.5.0
5
- before_install: gem install bundler -v 1.16.1.pre1
5
+ - 2.7.1
6
+ before_install: gem install bundler -v 2.1.4
data/CODE_OF_CONDUCT.md CHANGED
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
55
55
  ## Enforcement
56
56
 
57
57
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at mickey@vt.edu. All
58
+ reported by contacting the project team at mickey@cowden.tech. All
59
59
  complaints will be reviewed and investigated and will result in a response that
60
60
  is deemed necessary and appropriate to the circumstances. The project team is
61
61
  obligated to maintain confidentiality with regard to the reporter of an incident.
@@ -68,7 +68,7 @@ members of the project's leadership.
68
68
  ## Attribution
69
69
 
70
70
  This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
72
 
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
-
5
3
  # Specify your gem's dependencies in cow_auth.gemspec
6
4
  gemspec
5
+
6
+ gem 'rake', '~> 12.0'
7
+ gem 'minitest', '~> 5.0'
data/Gemfile.lock CHANGED
@@ -1,41 +1,46 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cow_auth (0.5.3)
5
- activesupport (~> 5.1)
4
+ cow_auth (0.7.1)
5
+ activerecord (~> 6.0)
6
6
  scrypt (~> 3.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (5.1.4)
11
+ activemodel (6.1.3)
12
+ activesupport (= 6.1.3)
13
+ activerecord (6.1.3)
14
+ activemodel (= 6.1.3)
15
+ activesupport (= 6.1.3)
16
+ activesupport (6.1.3)
12
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
- i18n (~> 0.7)
14
- minitest (~> 5.1)
15
- tzinfo (~> 1.1)
16
- concurrent-ruby (1.0.5)
17
- ffi (1.9.18)
18
+ i18n (>= 1.6, < 2)
19
+ minitest (>= 5.1)
20
+ tzinfo (~> 2.0)
21
+ zeitwerk (~> 2.3)
22
+ concurrent-ruby (1.1.8)
23
+ ffi (1.15.0)
18
24
  ffi-compiler (1.0.1)
19
25
  ffi (>= 1.0.0)
20
26
  rake
21
- i18n (0.9.1)
27
+ i18n (1.8.9)
22
28
  concurrent-ruby (~> 1.0)
23
- minitest (5.11.1)
24
- rake (12.3.0)
25
- scrypt (3.0.5)
29
+ minitest (5.14.4)
30
+ rake (12.3.3)
31
+ scrypt (3.0.7)
26
32
  ffi-compiler (>= 1.0, < 2.0)
27
- thread_safe (0.3.6)
28
- tzinfo (1.2.4)
29
- thread_safe (~> 0.1)
33
+ tzinfo (2.0.4)
34
+ concurrent-ruby (~> 1.0)
35
+ zeitwerk (2.4.2)
30
36
 
31
37
  PLATFORMS
32
38
  ruby
33
39
 
34
40
  DEPENDENCIES
35
- bundler (~> 1.16)
36
41
  cow_auth!
37
- minitest (~> 5.11)
38
- rake (~> 12.3)
42
+ minitest (~> 5.0)
43
+ rake (~> 12.0)
39
44
 
40
45
  BUNDLED WITH
41
- 1.16.1
46
+ 2.2.15
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 Mickey Cowden
3
+ Copyright (c) 2020 Mickey Cowden
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # CowAuth
2
2
 
3
- The main goal of this gem is to provide token-based authentication for Rails (or Rails-like) web applications.
3
+ The goal of this gem is to provide token-based authentication for Rails (or Rails-like) web applications.
4
4
 
5
5
  ## Installation
6
6
 
@@ -12,7 +12,7 @@ gem 'cow_auth'
12
12
 
13
13
  And then execute:
14
14
 
15
- $ bundle
15
+ $ bundle install
16
16
 
17
17
  Or install it yourself as:
18
18
 
@@ -26,37 +26,37 @@ Configure your user model to add the authentication mechanism.
26
26
 
27
27
  #### Generator (Example)
28
28
 
29
- $ bundle exec rails generate model user uuid:string:uniq email:string:uniq sid:string:uniq encrypted_password:string locale:string first_name:string last_name:string role:integer sign_in_count:integer is_approved:boolean is_deleted:boolean
29
+ $ bundle exec rails generate model user uuid:string:uniq email:string:uniq sid:string:uniq encrypted_password:string locale:string first_name:string last_name:string sign_in_count:integer is_enabled:boolean is_deleted:boolean
30
30
 
31
31
  #### Migration (Example)
32
32
 
33
33
  # Modified migration; includes indexes and other stuff you might not want.
34
- class CreateUsers < ActiveRecord::Migration[5.2]
34
+ class CreateUsers < ActiveRecord::Migration[6.0]
35
35
  def change
36
36
  create_table :users do |t|
37
37
  t.string :uuid, null: false
38
38
  t.string :email, null: false
39
39
  t.string :sid, null: false
40
- t.string :encrypted_password, null: false
41
40
  t.string :locale, null: false
41
+ t.string :encrypted_password, null: false
42
+ t.string :auth_token
42
43
  t.string :first_name
43
44
  t.string :last_name
44
- t.integer :role, default: 0, null: false
45
45
  t.integer :sign_in_count, default: 0, null: false
46
- t.boolean :is_approved, default: false, null: false
46
+ t.boolean :is_enabled, default: false, null: false
47
47
  t.boolean :is_deleted, default: false, null: false
48
+ t.timestamp :expires_at
48
49
  t.timestamps
49
- t.index [:uuid], unique: true
50
- t.index [:email], unique: true
51
- t.index [:sid], unique: true
52
50
  end
51
+ add_index :users, :uuid, unique: true
52
+ add_index :users, :email, unique: true
53
+ add_index :users, :sid, unique: true
53
54
  end
54
55
  end
55
56
 
56
- #### Model Concern
57
+ #### Model Inheritance
57
58
 
58
- class User < ApplicationRecord
59
- include CowAuth::User
59
+ class User < CowAuth::User
60
60
  end
61
61
 
62
62
  #### Create User
@@ -100,12 +100,40 @@ Add the following private method to the ApplicationController (assuming User is
100
100
  end
101
101
  end
102
102
 
103
- #### Sessions Controller Example
103
+ #### Sessions Controller HTML Example
104
+
105
+ The `sign_in_success_path` and `sign_out_success_path` methods need to be defined for redirecting after successful sign-in and sign-out.
106
+
107
+ class SessionsController < ApplicationController
108
+ include CowAuth::SessionAuth::SessionEndpoints
109
+
110
+ skip_before_action :authenticate_user, only: [:new, :create]
111
+
112
+ private
113
+
114
+ def sign_in_success_path
115
+ return root_url
116
+ end
117
+
118
+ def sign_out_success_path
119
+ return sign_in_url
120
+ end
121
+ end
122
+
123
+ #### Sessions Controller JSON Example
124
+
125
+ The `sign_in_success_response_payload` method can optionally be overridden to customize the response payload for a successful sign-in.
104
126
 
105
127
  class Api::V1::SessionsController < ApplicationController
106
128
  include CowAuth::TokenAuth::SessionEndpoints
107
129
 
108
130
  skip_before_action :authenticate_user, only: [:create]
131
+
132
+ protected
133
+
134
+ def sign_in_success_response_payload
135
+ return { uuid: @user.uuid, sid: @user.sid, auth_token: @user.auth_token }
136
+ end
109
137
  end
110
138
 
111
139
  ### Token Authentication
@@ -138,7 +166,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
138
166
 
139
167
  ## Contributing
140
168
 
141
- Bug reports and pull requests are welcome on GitHub at https://github.com/mickey13/cow_auth. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
169
+ Bug reports and pull requests are welcome on GitHub at https://github.com/mickey13/cow-auth. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/mickey13/cow-auth/blob/master/CODE_OF_CONDUCT.md).
142
170
 
143
171
  ## License
144
172
 
@@ -146,4 +174,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
146
174
 
147
175
  ## Code of Conduct
148
176
 
149
- Everyone interacting in the CowAuth projects codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/mickey13/cow-auth/blob/master/CODE_OF_CONDUCT.md).
177
+ Everyone interacting in the CowAuth project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/mickey13/cow-auth/blob/master/CODE_OF_CONDUCT.md).
data/cow_auth.gemspec CHANGED
@@ -1,31 +1,30 @@
1
-
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'cow_auth/version'
1
+ require_relative 'lib/cow_auth/version'
5
2
 
6
3
  Gem::Specification.new do |spec|
7
4
  spec.name = 'cow_auth'
8
5
  spec.version = CowAuth::VERSION
9
6
  spec.authors = ['Mickey Cowden']
10
- spec.email = ['mickey@vt.edu']
7
+ spec.email = ['mickey@cowden.tech']
11
8
 
12
9
  spec.summary = 'Authentication gem'
13
- spec.description = 'The main goal of this gem is to provide token-based authentication for Rails (or Rails-like) web applications.'
10
+ spec.description = 'The goal of this gem is to provide token-based authentication for Rails (or Rails-like) web applications.'
14
11
  spec.homepage = 'https://github.com/mickey13/cow-auth'
15
12
  spec.license = 'MIT'
13
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
14
+
15
+ spec.metadata['homepage_uri'] = spec.homepage
16
+ spec.metadata['source_code_uri'] = spec.homepage
17
+ spec.metadata['changelog_uri'] = spec.homepage
16
18
 
17
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
- f.match(%r{^(test|spec|features)/})
19
+ # Specify which files should be added to the gem when it is released.
20
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
22
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
23
  end
20
24
  spec.bindir = 'exe'
21
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
26
  spec.require_paths = ['lib']
23
27
 
24
- spec.required_ruby_version = '~> 2.4'
25
-
26
- spec.add_development_dependency 'bundler', '~> 1.16'
27
- spec.add_development_dependency 'rake', '~> 12.3'
28
- spec.add_development_dependency 'minitest', '~> 5.11'
29
- spec.add_runtime_dependency 'activesupport', '~> 5.1'
28
+ spec.add_runtime_dependency 'activerecord', '~> 6.0'
30
29
  spec.add_runtime_dependency 'scrypt', '~> 3.0'
31
30
  end
data/lib/cow_auth.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require 'cow_auth/version'
2
2
  require 'cow_auth/user'
3
3
  require 'cow_auth/exceptions'
4
+ require 'cow_auth/session_auth/session_endpoints'
5
+ require 'cow_auth/session_auth/authenticate_request'
4
6
  require 'cow_auth/token_auth/session_endpoints'
5
7
  require 'cow_auth/token_auth/authenticate_request'
6
8
 
@@ -1,7 +1,4 @@
1
1
  module CowAuth
2
2
  class NotAuthenticatedError < StandardError
3
3
  end
4
-
5
- class RedisHandleMissingError < StandardError
6
- end
7
4
  end
@@ -0,0 +1,21 @@
1
+ require 'cow_auth/exceptions'
2
+
3
+ module CowAuth
4
+ module SessionAuth
5
+ module AuthenticateRequest
6
+ extend ActiveSupport::Concern
7
+
8
+ private
9
+
10
+ def authenticate_user
11
+ @current_user = authentication_class.find_by(sid: session[:current_user])
12
+ raise CowAuth::NotAuthenticatedError.new('User not authenticated.') if @current_user.blank?
13
+ return true
14
+ end
15
+
16
+ def current_user
17
+ return @current_user
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,32 @@
1
+ require 'cow_auth/exceptions'
2
+
3
+ module CowAuth
4
+ module SessionAuth
5
+ module SessionEndpoints
6
+ extend ActiveSupport::Concern
7
+
8
+ def new
9
+ end
10
+
11
+ def create
12
+ user = authentication_class.find_by(email: params[:email])
13
+ if user.try(:authenticate_with_password, params[:password])
14
+ session[:current_user] = user.sid
15
+ redirect_to sign_in_success_path
16
+ else
17
+ session[:current_user] = nil
18
+ raise CowAuth::NotAuthenticatedError.new('Invalid user credentials.')
19
+ end
20
+ end
21
+
22
+ def destroy
23
+ if @current_user.present?
24
+ session[:current_user] = nil
25
+ redirect_to sign_out_success_path
26
+ else
27
+ raise CowAuth::StandardError.new('Could not sign user out.')
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -6,22 +6,28 @@ module CowAuth
6
6
  extend ActiveSupport::Concern
7
7
 
8
8
  def create
9
- user = authentication_class.find_by(email: params[:email])
10
- if user.try(:authenticate_with_password, params[:password])
11
- user.api_sign_in
12
- render json: { sid: user.sid, auth_token: user.auth_token }, status: :ok
9
+ @user = authentication_class.find_by(email: params[:email])
10
+ if @user.try(:authenticate_with_password, params[:password])
11
+ @user.create_auth_token
12
+ render json: self.sign_in_success_response_payload, status: :ok
13
13
  else
14
14
  raise CowAuth::NotAuthenticatedError.new('Invalid user credentials.')
15
15
  end
16
16
  end
17
17
 
18
18
  def destroy
19
- if @current_user.try(:api_sign_out)
19
+ if @current_user.try(:destroy_auth_token)
20
20
  head :no_content
21
21
  else
22
22
  raise CowAuth::NotAuthenticatedError.new('Could not sign user out.')
23
23
  end
24
24
  end
25
+
26
+ protected
27
+
28
+ def sign_in_success_response_payload
29
+ return { sid: @user.sid, auth_token: @user.auth_token }
30
+ end
25
31
  end
26
32
  end
27
33
  end
data/lib/cow_auth/user.rb CHANGED
@@ -1,20 +1,16 @@
1
+ require 'active_record'
1
2
  require 'scrypt'
2
- require 'cow_auth/exceptions'
3
3
 
4
4
  module CowAuth
5
- module User
6
- extend ActiveSupport::Concern
5
+ class User < ActiveRecord::Base
6
+ after_initialize :generate_sid_if_necessary
7
7
 
8
- included do
9
- after_initialize :generate_sid_if_necessary
10
-
11
- validates :email, presence: true
12
- validates :email, uniqueness: true
13
- validates :encrypted_password, presence: true
14
- validates :sid, presence: true
15
- validates :sid, uniqueness: true
16
- validates :sid, format: { with: /\AC[a-z0-9]{32}\z/ }
17
- end
8
+ validates :email, presence: true
9
+ validates :email, uniqueness: true
10
+ validates :encrypted_password, presence: true
11
+ validates :sid, presence: true
12
+ validates :sid, uniqueness: true
13
+ validates :sid, format: { with: /\AC[a-z0-9]{32}\z/ }
18
14
 
19
15
  def authenticate_with_password(password)
20
16
  return false if self.encrypted_password.blank?
@@ -26,34 +22,31 @@ module CowAuth
26
22
  end
27
23
 
28
24
  def authenticate_with_token(auth_token)
29
- api_key = self.fetch_api_key_from_redis(sid)
30
- if api_key.present? &&
31
- api_key.key?(:auth_token) &&
32
- api_key.key?(:expires_at) &&
33
- api_key[:auth_token] == auth_token &&
34
- api_key[:expires_at] > Time.zone.now
25
+ if self.auth_token.present? &&
26
+ self.expires_at.present? &&
27
+ self.auth_token == auth_token &&
28
+ self.expires_at > Time.zone.now
35
29
  return true
36
30
  end
37
31
  return false
38
32
  end
39
33
 
40
- def api_sign_in
41
- self.redis_handle.set(self.redis_key, {
34
+ def create_auth_token
35
+ self.update(
42
36
  auth_token: self.token_valid? ? self.auth_token : self.generate_auth_token,
43
37
  expires_at: self.generate_token_expires_at
44
- }.to_json)
38
+ )
45
39
  return true
46
40
  end
47
41
 
48
- def api_sign_out
49
- self.redis_handle.del(self.redis_key)
42
+ def destroy_auth_token
43
+ self.update(
44
+ auth_token: nil,
45
+ expires_at: nil
46
+ )
50
47
  return true
51
48
  end
52
49
 
53
- def auth_token
54
- return self.fetch_api_key_from_redis(self.sid).try(:[], :auth_token)
55
- end
56
-
57
50
  def password=(new_password)
58
51
  return false if new_password.blank?
59
52
  salt = SCrypt::Engine.generate_salt
@@ -63,11 +56,6 @@ module CowAuth
63
56
 
64
57
  protected
65
58
 
66
- def fetch_api_key_from_redis(sid)
67
- api_key = self.redis_handle.get(self.redis_key)
68
- return api_key.present? ? JSON.parse(api_key).try(:symbolize_keys) : nil
69
- end
70
-
71
59
  def generate_auth_token
72
60
  return SecureRandom.hex(64)
73
61
  end
@@ -76,21 +64,10 @@ module CowAuth
76
64
  return 1.month.from_now
77
65
  end
78
66
 
79
- def redis_handle
80
- raise CowAuth::RedisHandleMissingError.new('"$redis" handle not found.') unless $redis.present?
81
- return $redis
82
- end
83
-
84
- def redis_key
85
- return "user_#{self.sid.downcase}"
86
- end
87
-
88
67
  def token_valid?
89
- api_key = self.fetch_api_key_from_redis(self.sid)
90
- return api_key.present? &&
91
- api_key.key?(:auth_token) &&
92
- api_key.key?(:expires_at) &&
93
- api_key[:expires_at] > Time.zone.now
68
+ return self.auth_token.present? &&
69
+ self.expires_at.present? &&
70
+ self.expires_at > Time.zone.now
94
71
  end
95
72
 
96
73
  private
@@ -1,3 +1,3 @@
1
1
  module CowAuth
2
- VERSION = '0.5.3'
2
+ VERSION = '0.7.1'
3
3
  end
metadata CHANGED
@@ -1,71 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cow_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mickey Cowden
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-18 00:00:00.000000000 Z
11
+ date: 2021-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.16'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.16'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '12.3'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '12.3'
41
- - !ruby/object:Gem::Dependency
42
- name: minitest
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '5.11'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '5.11'
55
- - !ruby/object:Gem::Dependency
56
- name: activesupport
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '5.1'
19
+ version: '6.0'
62
20
  type: :runtime
63
21
  prerelease: false
64
22
  version_requirements: !ruby/object:Gem::Requirement
65
23
  requirements:
66
24
  - - "~>"
67
25
  - !ruby/object:Gem::Version
68
- version: '5.1'
26
+ version: '6.0'
69
27
  - !ruby/object:Gem::Dependency
70
28
  name: scrypt
71
29
  requirement: !ruby/object:Gem::Requirement
@@ -80,10 +38,10 @@ dependencies:
80
38
  - - "~>"
81
39
  - !ruby/object:Gem::Version
82
40
  version: '3.0'
83
- description: The main goal of this gem is to provide token-based authentication for
84
- Rails (or Rails-like) web applications.
41
+ description: The goal of this gem is to provide token-based authentication for Rails
42
+ (or Rails-like) web applications.
85
43
  email:
86
- - mickey@vt.edu
44
+ - mickey@cowden.tech
87
45
  executables: []
88
46
  extensions: []
89
47
  extra_rdoc_files: []
@@ -101,6 +59,8 @@ files:
101
59
  - cow_auth.gemspec
102
60
  - lib/cow_auth.rb
103
61
  - lib/cow_auth/exceptions.rb
62
+ - lib/cow_auth/session_auth/authenticate_request.rb
63
+ - lib/cow_auth/session_auth/session_endpoints.rb
104
64
  - lib/cow_auth/token_auth/authenticate_request.rb
105
65
  - lib/cow_auth/token_auth/session_endpoints.rb
106
66
  - lib/cow_auth/user.rb
@@ -108,25 +68,27 @@ files:
108
68
  homepage: https://github.com/mickey13/cow-auth
109
69
  licenses:
110
70
  - MIT
111
- metadata: {}
112
- post_install_message:
71
+ metadata:
72
+ homepage_uri: https://github.com/mickey13/cow-auth
73
+ source_code_uri: https://github.com/mickey13/cow-auth
74
+ changelog_uri: https://github.com/mickey13/cow-auth
75
+ post_install_message:
113
76
  rdoc_options: []
114
77
  require_paths:
115
78
  - lib
116
79
  required_ruby_version: !ruby/object:Gem::Requirement
117
80
  requirements:
118
- - - "~>"
81
+ - - ">="
119
82
  - !ruby/object:Gem::Version
120
- version: '2.4'
83
+ version: 2.3.0
121
84
  required_rubygems_version: !ruby/object:Gem::Requirement
122
85
  requirements:
123
86
  - - ">="
124
87
  - !ruby/object:Gem::Version
125
88
  version: '0'
126
89
  requirements: []
127
- rubyforge_project:
128
- rubygems_version: 2.7.4
129
- signing_key:
90
+ rubygems_version: 3.2.15
91
+ signing_key:
130
92
  specification_version: 4
131
93
  summary: Authentication gem
132
94
  test_files: []