Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rails_api_authentication
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
rails_api_authentication
Commits
9980927d
Commit
9980927d
authored
May 02, 2017
by
liyijie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add adapters
parent
de99506d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
81 additions
and
0 deletions
+81
-0
adapter.rb
lib/rails_api_authentication/adapter.rb
+7
-0
active_record_adapter.rb
...ails_api_authentication/adapters/active_record_adapter.rb
+14
-0
mongoid_adapter.rb
lib/rails_api_authentication/adapters/mongoid_adapter.rb
+14
-0
rails_adapter.rb
lib/rails_api_authentication/adapters/rails_adapter.rb
+14
-0
rails_api_adapter.rb
lib/rails_api_authentication/adapters/rails_api_adapter.rb
+18
-0
rails_metal_adapter.rb
lib/rails_api_authentication/adapters/rails_metal_adapter.rb
+14
-0
No files found.
lib/rails_api_authentication/adapter.rb
0 → 100644
View file @
9980927d
module
RailsApiAuthentication
module
Adapter
def
base_class
raise
NotImplementedError
end
end
end
lib/rails_api_authentication/adapters/active_record_adapter.rb
0 → 100644
View file @
9980927d
require
'active_record'
require
'rails_api_authentication/adapter'
module
RailsApiAuthentication
module
Adapters
class
ActiveRecordAdapter
extend
RailsApiAuthentication
::
Adapter
def
self
.
base_class
::
ActiveRecord
::
Base
end
end
end
end
lib/rails_api_authentication/adapters/mongoid_adapter.rb
0 → 100644
View file @
9980927d
require
'mongoid'
require
'rails_api_authentication/adapter'
module
RailsApiAuthentication
module
Adapters
class
MongoidAdapter
extend
RailsApiAuthentication
::
Adapter
def
self
.
base_class
::
Mongoid
::
Document
end
end
end
end
lib/rails_api_authentication/adapters/rails_adapter.rb
0 → 100644
View file @
9980927d
require
'action_controller'
require
'rails_api_authentication/adapter'
module
RailsApiAuthentication
module
Adapters
class
RailsAdapter
extend
RailsApiAuthentication
::
Adapter
def
self
.
base_class
::
ActionController
::
Base
end
end
end
end
lib/rails_api_authentication/adapters/rails_api_adapter.rb
0 → 100644
View file @
9980927d
require
'action_controller'
require
'rails_api_authentication/adapter'
module
RailsApiAuthentication
module
Adapters
class
RailsAPIAdapter
extend
RailsApiAuthentication
::
Adapter
def
self
.
base_class
::
ActionController
::
API
end
end
# make the adpater available even if the 'API' acronym is not defined
RailsApiAdapter
=
RailsAPIAdapter
end
end
lib/rails_api_authentication/adapters/rails_metal_adapter.rb
0 → 100644
View file @
9980927d
require
'action_controller'
require
'rails_api_authentication/adapter'
module
RailsApiAuthentication
module
Adapters
class
RailsMetalAdapter
extend
RailsApiAuthentication
::
Adapter
def
self
.
base_class
::
ActionController
::
Metal
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment