unidom-visitor 0.5 → 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 +4 -4
- data/app/models/unidom/visitor/password.rb +6 -3
- data/app/models/unidom/visitor/user.rb +1 -1
- data/lib/unidom/visitor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2deb20a10510bafbc43d8daed41bb0f6568f4cd8
|
4
|
+
data.tar.gz: 5081d87ec23955780fd9ddc2b053cb457c6671c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 916792a07078800f18ba7dc49c5b01af83826918925749079d9090dc436e7b05d10d489225366f26b44981ec9880be49927a743f9e2431b9b917c8e9a05b6404
|
7
|
+
data.tar.gz: 3b22150addef1f32cb4cfba4df5c0d079f4085151e49f5a8bb678d562b4aa1c08a9f22f9f108ef524a2825869e0ed00c93cdd9a95fda36e8513dca8cb9f8a537
|
@@ -4,19 +4,22 @@ class Unidom::Visitor::Password < ActiveRecord::Base
|
|
4
4
|
|
5
5
|
self.table_name = 'unidom_passwords'
|
6
6
|
|
7
|
-
has_one :authenticating, class_name: 'Unidom::Visitor::Authenticating', as: :credential
|
8
|
-
|
9
7
|
include Unidom::Common::Concerns::ModelExtension
|
10
8
|
|
9
|
+
validates :clear_text, presence: true, length: { in: 6..200 }
|
10
|
+
|
11
|
+
has_one :authenticating, class_name: 'Unidom::Visitor::Authenticating', as: :credential
|
12
|
+
|
11
13
|
def generate_pepper_content
|
12
14
|
self.pepper_content = self.pepper_content||::SecureRandom.hex(self.class.columns_hash['pepper_content'].limit/2)
|
13
15
|
end
|
14
16
|
|
15
17
|
def clear_text
|
16
|
-
|
18
|
+
@clear_text
|
17
19
|
end
|
18
20
|
|
19
21
|
def clear_text=(password)
|
22
|
+
@clear_text = password
|
20
23
|
generate_pepper_content
|
21
24
|
self.hashed_content = hash password
|
22
25
|
end
|
@@ -20,7 +20,7 @@ class Unidom::Visitor::User < ActiveRecord::Base
|
|
20
20
|
Rails.logger.debug "Signing up user with identity: #{identity.inspect}."
|
21
21
|
return false if identified_by(identity).valid_at.alive.merge(Unidom::Visitor::Identificating.valid_at.alive).count>0
|
22
22
|
|
23
|
-
user =
|
23
|
+
user = create! opened_at: opened_at
|
24
24
|
identificating = Unidom::Visitor::Identificating.identificate user, identity
|
25
25
|
|
26
26
|
Rails.logger.debug "Authenticate user #{user.id} with password: #{password.inspect}."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-visitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|