authstrategies 0.0.5 → 0.0.6
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 +8 -8
- data/lib/authstrategies.rb +3 -4
- data/lib/authstrategies/version.rb +1 -1
- data/lib/views/login.erb +8 -0
- data/lib/views/signup.erb +8 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGY1ZDIxMDhhYWMxZmJiYmZiOWU5NzM4Y2EyZmY3NDA0NjBmYzRlYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGUwMDE5ZDc0YTQ5ZGViNjZiNTczNmQxMWJlMTJlNTNlM2UwOWMxZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTk0MWUxOGU1MzRmMDk5YzhiYzAxMWQ3NWMwOWUxNzNhN2E4NzkxY2YxZWQ5
|
10
|
+
NjEyNGVkNDFiMWYxNTQzNDc5NDczYjUxYmEwZGQwOGY1YTllNzExMGEwNTc2
|
11
|
+
OTUwYzQ1NGZiYWNhYTU3ZTNhYzA3Y2Q1ZTMwZjVlYjE3YTY1ZTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzI2NjViNzJlMzhkMzQ0NTljMGM1NDM5MjAyNDdiNDE2Mjk0NmQ3OWFjNmM0
|
14
|
+
ZGJlNTJjYjY0MmNlYWViODk0ZTQzZDFhM2ZlZmU2YjRmYmY2NmQwNDU4YmFl
|
15
|
+
ZGUyNWRmMDc2Y2FmMjUyMjdlNDYzZDRmM2MyZWI0ZThlNmNhOTk=
|
data/lib/authstrategies.rb
CHANGED
@@ -3,6 +3,8 @@ require "warden"
|
|
3
3
|
require "rack-flash"
|
4
4
|
require "sinatra/base"
|
5
5
|
require "active_record"
|
6
|
+
require "authstrategies/helpers"
|
7
|
+
require "authstrategies/user"
|
6
8
|
|
7
9
|
module Authstrategies
|
8
10
|
private
|
@@ -39,7 +41,7 @@ module Authstrategies
|
|
39
41
|
manager.default_strategies :password
|
40
42
|
end
|
41
43
|
|
42
|
-
Warden::Strategies.add(:password,
|
44
|
+
Warden::Strategies.add(:password, PasswordStrategy)
|
43
45
|
|
44
46
|
app.get '/login/?' do
|
45
47
|
redirect '/' if authenticated?
|
@@ -93,6 +95,3 @@ module Authstrategies
|
|
93
95
|
register Base
|
94
96
|
end
|
95
97
|
end
|
96
|
-
|
97
|
-
require "authstrategies/helpers"
|
98
|
-
require "authstrategies/user"
|
data/lib/views/login.erb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<%= flash[:error] %>
|
2
|
+
<%= flash[:notice] %>
|
3
|
+
<form action="login" method="post">
|
4
|
+
<p>Username:<input type="text" name="email" /></p>
|
5
|
+
<p>Password:<input type="password" name="password" /></p>
|
6
|
+
<p>Remember Me: <input type="radio" name="remember_me" /></p>
|
7
|
+
<p><input type="submit" name="Submit" /></p>
|
8
|
+
</form>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%= flash[:error] %>
|
2
|
+
<%= flash[:notice] %>
|
3
|
+
<form action="signup" method="post">
|
4
|
+
<p>E-mail:<input type="text" name="email" /></p>
|
5
|
+
<p>Password:<input type="password" name="password" /></p>
|
6
|
+
<p>Confirm password:<input type="password" name="password_confirmation" /></p>
|
7
|
+
<input type="submit" value="Register!" />
|
8
|
+
</form>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authstrategies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dobromir Ivanov
|
@@ -125,6 +125,8 @@ files:
|
|
125
125
|
- lib/authstrategies.rb
|
126
126
|
- lib/authstrategies/helpers.rb
|
127
127
|
- lib/authstrategies/version.rb
|
128
|
+
- lib/views/login.erb
|
129
|
+
- lib/views/signup.erb
|
128
130
|
homepage: ''
|
129
131
|
licenses:
|
130
132
|
- MIT
|