devision 0.0.4.1 → 0.0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/devision/models/tokenizable.rb +12 -14
- data/lib/devision/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fb76e472a642ae2fecdaaebebe191f5dcd65d33
|
4
|
+
data.tar.gz: a3300c4445a66872d6c319895ca06945842f7100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef54b08c3dfe1f936f0c9f611c39bea4b6d93d82986dd766f96413ce95b7b8de5da01f6145886faf996fe6bbccf864bd4e98aea342e0651ebcf7bc9f6429be12
|
7
|
+
data.tar.gz: db941f0a7e9ef77f2c7d1710e8ebcca58e789800e9c7c7a2f16d8a45fd2a0067d5892cdee0e501405aa647d157948e4bcfc54bee57dd1223051b14fba1574a4d
|
@@ -9,24 +9,22 @@ module Devision
|
|
9
9
|
end
|
10
10
|
|
11
11
|
included do
|
12
|
-
|
13
12
|
attr_reader :raw_token
|
13
|
+
end
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
def generate_tokens!
|
22
|
-
generate_tokens && save(validate: false)
|
23
|
-
end
|
15
|
+
def generate_tokens
|
16
|
+
raw, enc = Devision.token_generator.generate(self.class, :token)
|
17
|
+
@raw_token = raw
|
18
|
+
self.token = enc
|
19
|
+
end
|
24
20
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
21
|
+
def generate_tokens!
|
22
|
+
generate_tokens && save(validate: false)
|
23
|
+
end
|
29
24
|
|
25
|
+
def clear_token
|
26
|
+
@raw_token = nil
|
27
|
+
self.token = nil
|
30
28
|
end
|
31
29
|
|
32
30
|
module ClassMethods
|
data/lib/devision/version.rb
CHANGED