devise_ichain_authenticatable 0.3.1 → 0.3.2
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fbdb126a83944aba762d8827533571cc04b3c83ab5d34ee119da1a3591593a1d
|
4
|
+
data.tar.gz: f7c0bc045dab604dbb450741abf86918b239206e25d3270b04713ca26d1fc548
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e8b82764a16cc8b6f25bfa325fff910750d7991f29a41eca1ff3e482db23709c44ef08313cb50bab04a588436725bcfde68e5f0f0c21043d0999cd95925b55b
|
7
|
+
data.tar.gz: 7b6f5c79f674adfb2ffa968287f4ec9262aa8d662fd97e62f213dc6ab7817498465d1eb160f4c29ddafec0674a4ae515799b8f162b65051e644944682980f52e
|
data/README.md
CHANGED
@@ -39,10 +39,10 @@ class User < ActiveRecord::Base
|
|
39
39
|
devise :ichain_authenticatable, :ichain_registerable
|
40
40
|
|
41
41
|
def self.for_ichain_username(username, attributes)
|
42
|
-
if user = find_by(login: username)
|
42
|
+
if (user = find_by(login: username))
|
43
43
|
user.update_column(email: attributes[:email]) if user.email != attributes[:email]
|
44
44
|
else
|
45
|
-
|
45
|
+
create(login: username, email: attributes[:email])
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Devise::IchainRegistrationsController < DeviseController
|
2
|
-
|
3
|
-
|
2
|
+
prepend_before_action :require_no_authentication, :only => [ :new ]
|
3
|
+
prepend_before_action :authenticate_scope!, :only => [:edit, :update]
|
4
4
|
|
5
5
|
def new
|
6
6
|
redirect_url = base_url + after_sign_up_path_for(resource_name)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class Devise::IchainSessionsController < DeviseController
|
2
|
-
|
2
|
+
prepend_before_action :require_no_authentication, :only => [ :new, :test ]
|
3
3
|
|
4
4
|
def new
|
5
5
|
return new_test if ::Devise.ichain_test_mode
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_ichain_authenticatable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ancor González Sosa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.2'
|
27
27
|
description: Devise extension to allow authentication via iChain
|
@@ -58,17 +58,16 @@ require_paths:
|
|
58
58
|
- lib
|
59
59
|
required_ruby_version: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- -
|
61
|
+
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '0'
|
64
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
requirements: []
|
70
|
-
|
71
|
-
rubygems_version: 2.0.3
|
70
|
+
rubygems_version: 3.0.3
|
72
71
|
signing_key:
|
73
72
|
specification_version: 4
|
74
73
|
summary: Devise extension to allow authentication via iChain
|