devise-naught_authentication 0.1.3 → 0.1.4
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.
- data/README.rdoc +36 -1
- data/VERSION +1 -1
- data/devise-naught_authentication.gemspec +2 -4
- data/lib/devise/naught_authentication.rb +1 -1
- data/lib/devise/naught_authentication/strategy.rb +0 -5
- metadata +3 -5
- data/README.md +0 -0
data/README.rdoc
CHANGED
@@ -1,9 +1,44 @@
|
|
1
1
|
= devise-naught_authentication
|
2
2
|
|
3
|
+
Naught:
|
4
|
+
|
5
|
+
n. Nonexistence; nothingness.
|
6
|
+
n. The figure 0; a cipher; a zero.
|
7
|
+
|
8
|
+
Backstory:
|
9
|
+
|
10
|
+
The 'devise' strategy : 'Database Authenticatable' injects routing information that is used by the devise_for
|
11
|
+
helper in the Rails Routing file. Without this information there is no possible way to build a custom session
|
12
|
+
controller and use the rich world of devise plugins to build with.
|
13
|
+
|
14
|
+
Rails provides a number of http authentication helpers , digest, basic and token and Devise provides sign_in and
|
15
|
+
internal helpers for authentication / sign_in etc that can be combined with a custom session controller.
|
16
|
+
|
17
|
+
Without a Shim to turn on the session controller - devise_for doesn't function.
|
18
|
+
|
19
|
+
This is such a shim. It it is to create devise model that is not authenticatable and yet is.
|
20
|
+
|
21
|
+
I'm now able to turn on a special session controller that our client which is doing OAUTH 2.0 negotiation with a
|
22
|
+
3rd party service will use to exchange with our api-server (which will verify their 3rd party credential) to get
|
23
|
+
a api-server credential that can be re-used.
|
24
|
+
|
25
|
+
|
26
|
+
devise_for :users, path_names: {sign_in: ''}, controllers: {sessions: "accounts"}, only: :sessions, path: 'account'
|
27
|
+
|
28
|
+
Our sessions controller will farm out user exchange to another system and is used to negoitate a session token.
|
29
|
+
|
30
|
+
class AccountsController < Devise::SessionsController
|
31
|
+
def create
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
What is it?
|
36
|
+
|
3
37
|
This is not an authentication scheme - it is a Null Authentication scheme that plugs into devise, generates appropriate controllers and
|
4
38
|
always fails.
|
5
39
|
|
6
|
-
It is usefull to compose it with a pre-cursor authentication scheme like simple_token_authentication
|
40
|
+
It is usefull to compose it with a pre-cursor authentication scheme like simple_token_authentication , or the rails http
|
41
|
+
authentication helpers while still utilizing the rich world of devise.
|
7
42
|
|
8
43
|
== Contributing to devise-naught_authentication
|
9
44
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
@@ -5,16 +5,15 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "devise-naught_authentication"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Curtis9"]
|
12
|
-
s.date = "2014-03-
|
12
|
+
s.date = "2014-03-20"
|
13
13
|
s.description = "A Routable, but not authenticatable devise module - useful for creating api authentication schemes not based on database user"
|
14
14
|
s.email = "curtis@lindenlab.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
|
-
"README.md",
|
18
17
|
"README.rdoc"
|
19
18
|
]
|
20
19
|
s.files = [
|
@@ -23,7 +22,6 @@ Gem::Specification.new do |s|
|
|
23
22
|
"Gemfile",
|
24
23
|
"Gemfile.lock",
|
25
24
|
"LICENSE.txt",
|
26
|
-
"README.md",
|
27
25
|
"README.rdoc",
|
28
26
|
"Rakefile",
|
29
27
|
"VERSION",
|
@@ -1,11 +1,6 @@
|
|
1
1
|
module Devise
|
2
2
|
module Strategies
|
3
3
|
class NaughtAuthentication < Devise::Strategies::Authenticatable
|
4
|
-
|
5
|
-
# This check is run before +authenticate!+ is called to determine if this
|
6
|
-
# authentication strategy is applicable. In this case we only try to authenticate
|
7
|
-
# if the login and password are present
|
8
|
-
#
|
9
4
|
def valid?
|
10
5
|
false
|
11
6
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-naught_authentication
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -98,7 +98,6 @@ executables: []
|
|
98
98
|
extensions: []
|
99
99
|
extra_rdoc_files:
|
100
100
|
- LICENSE.txt
|
101
|
-
- README.md
|
102
101
|
- README.rdoc
|
103
102
|
files:
|
104
103
|
- .document
|
@@ -106,7 +105,6 @@ files:
|
|
106
105
|
- Gemfile
|
107
106
|
- Gemfile.lock
|
108
107
|
- LICENSE.txt
|
109
|
-
- README.md
|
110
108
|
- README.rdoc
|
111
109
|
- Rakefile
|
112
110
|
- VERSION
|
@@ -132,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
130
|
version: '0'
|
133
131
|
segments:
|
134
132
|
- 0
|
135
|
-
hash: -
|
133
|
+
hash: -3262730705071926365
|
136
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
135
|
none: false
|
138
136
|
requirements:
|
data/README.md
DELETED
File without changes
|