easy_auth-password 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.
- data/app/models/identities/password.rb +3 -0
- data/lib/easy_auth/controllers/password_reset.rb +4 -4
- data/lib/easy_auth/password.rb +0 -4
- data/lib/easy_auth/password/controllers/sessions.rb +0 -11
- data/lib/easy_auth/password/models/account.rb +2 -2
- data/lib/easy_auth/password/version.rb +1 -1
- metadata +7 -8
- data/app/models/easy_auth/identities/password.rb +0 -3
- data/lib/tasks/easy_auth_tasks.rake +0 -4
@@ -6,15 +6,15 @@ module EasyAuth::Controllers::PasswordReset
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def new
|
9
|
-
@identity = EasyAuth.
|
9
|
+
@identity = EasyAuth.find_identity_model(params).new
|
10
10
|
end
|
11
11
|
|
12
12
|
def create
|
13
|
-
if @identity = EasyAuth.
|
13
|
+
if @identity = EasyAuth.find_identity_model(params).where(:username => params[:identities_password][:username]).first
|
14
14
|
@identity.generate_reset_token!
|
15
15
|
PasswordResetMailer.reset(@identity.id).deliver
|
16
16
|
else
|
17
|
-
@identity = EasyAuth.
|
17
|
+
@identity = EasyAuth.find_identity_model(params).new(params[:identities_password])
|
18
18
|
end
|
19
19
|
|
20
20
|
flash.now[:notice] = I18n.t('easy_auth.password_reset.create.notice')
|
@@ -36,7 +36,7 @@ module EasyAuth::Controllers::PasswordReset
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def find_identity_from_reset_token
|
39
|
-
@identity = EasyAuth.
|
39
|
+
@identity = EasyAuth.find_identity_model(params).where(:reset_token => params[:reset_token].to_s).first
|
40
40
|
@identity.password_reset = true
|
41
41
|
end
|
42
42
|
|
data/lib/easy_auth/password.rb
CHANGED
@@ -4,15 +4,4 @@ module EasyAuth::Password::Controllers::Sessions
|
|
4
4
|
reverse_included do
|
5
5
|
before_filter :no_authentication, :only => :new, :if => Proc.new { params[:identity] == :password }
|
6
6
|
end
|
7
|
-
|
8
|
-
private
|
9
|
-
|
10
|
-
def after_successful_sign_in_with_password(identity)
|
11
|
-
end
|
12
|
-
|
13
|
-
def after_successful_sign_in_url_with_password(identity)
|
14
|
-
end
|
15
|
-
|
16
|
-
def after_failed_sign_in_with_password(identity)
|
17
|
-
end
|
18
7
|
end
|
@@ -15,7 +15,7 @@ module EasyAuth::Password::Models::Account
|
|
15
15
|
before_update :update_password_identity, :if => :run_password_identity_validations?
|
16
16
|
|
17
17
|
# Associations
|
18
|
-
has_one :password_identity, :class_name => '
|
18
|
+
has_one :password_identity, :class_name => 'Identities::Password', :foreign_key => :account_id
|
19
19
|
end
|
20
20
|
|
21
21
|
def run_password_identity_validations?
|
@@ -25,7 +25,7 @@ module EasyAuth::Password::Models::Account
|
|
25
25
|
private
|
26
26
|
|
27
27
|
def setup_password_identity
|
28
|
-
self.identities << EasyAuth.
|
28
|
+
self.identities << EasyAuth.find_identity_model(:identity => :password).new(password_identity_attributes)
|
29
29
|
end
|
30
30
|
|
31
31
|
def update_password_identity
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_auth-password
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
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: 2012-11-
|
12
|
+
date: 2012-11-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: easy_auth
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.2.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: sqlite3
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -197,7 +197,7 @@ extra_rdoc_files: []
|
|
197
197
|
files:
|
198
198
|
- app/controllers/password_reset_controller.rb
|
199
199
|
- app/mailers/password_reset_mailer.rb
|
200
|
-
- app/models/
|
200
|
+
- app/models/identities/password.rb
|
201
201
|
- app/views/password_reset/edit.html.erb
|
202
202
|
- app/views/password_reset/new.html.erb
|
203
203
|
- app/views/password_reset_mailer/reset.html.erb
|
@@ -217,7 +217,6 @@ files:
|
|
217
217
|
- lib/easy_auth/password/version.rb
|
218
218
|
- lib/easy_auth/password.rb
|
219
219
|
- lib/easy_auth-password.rb
|
220
|
-
- lib/tasks/easy_auth_tasks.rake
|
221
220
|
- Rakefile
|
222
221
|
- README.md
|
223
222
|
homepage: https://github.com/dockyard/easy_auth-password
|
@@ -234,7 +233,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
234
233
|
version: '0'
|
235
234
|
segments:
|
236
235
|
- 0
|
237
|
-
hash:
|
236
|
+
hash: -4240566048460302950
|
238
237
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
238
|
none: false
|
240
239
|
requirements:
|
@@ -243,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
242
|
version: '0'
|
244
243
|
segments:
|
245
244
|
- 0
|
246
|
-
hash:
|
245
|
+
hash: -4240566048460302950
|
247
246
|
requirements: []
|
248
247
|
rubyforge_project:
|
249
248
|
rubygems_version: 1.8.23
|