arkaan 3.0.0 → 3.1.0
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/lib/arkaan/authentication/session.rb +4 -4
- data/lib/arkaan/oauth/application.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65f4e93f704391dc219068d5a5159d2866a1a4a6e42c7b9cfe39585bb933fba8
|
4
|
+
data.tar.gz: 5eac7078fe5e4a32b70fbca4c3d7d6282440fbe7d27b2e5c8a6a715c37ecad5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4bc3270b90c4ac5da60de1f8a09b1f5b8e2ab72c0f3d0d444d9708b400ff29c04f6828547b8c666b37d7be39dfb0283a338f0904e0275e35d4ece8e33247bd3
|
7
|
+
data.tar.gz: 1eda8e5ab833ecfaad48beafe3953f07e56139d513476fab37d0c99622908930d6458637539704c31ac012575a4bc911c46a0b04f5a4def2755a12168e4ce89d
|
@@ -12,7 +12,7 @@ module Arkaan
|
|
12
12
|
|
13
13
|
# @!attribute [rw] token
|
14
14
|
# @return [String] the unique token for this session, used to identify it and be sure the user is connected.
|
15
|
-
field :
|
15
|
+
field :session_id, type: String
|
16
16
|
# @!attribute [rw] websocket_id
|
17
17
|
# @return [String] the ID of the websocket the user is connected to.
|
18
18
|
# It's not an association because instances are embedded.
|
@@ -22,10 +22,10 @@ module Arkaan
|
|
22
22
|
# @return [Arkaan::Account] the account connected to the application.
|
23
23
|
belongs_to :account, class_name: 'Arkaan::Account', inverse_of: :sessions
|
24
24
|
|
25
|
-
validates :
|
25
|
+
validates :session_id,
|
26
26
|
presence: { message: 'required' },
|
27
|
-
uniqueness: { message: 'uniq', if: :
|
28
|
-
length: { minimum: 10, message: 'minlength', if: :
|
27
|
+
uniqueness: { message: 'uniq', if: :session_id? },
|
28
|
+
length: { minimum: 10, message: 'minlength', if: :session_id? }
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -14,7 +14,7 @@ module Arkaan
|
|
14
14
|
field :name, type: String
|
15
15
|
# @!attribute [rw] key
|
16
16
|
# @return [String] the unique key for the application, identifying it when requesting a token for the API.
|
17
|
-
field :
|
17
|
+
field :app_key, type: String, default: -> { SecureRandom.hex }
|
18
18
|
# @!attribute [rw] premium
|
19
19
|
# @return [Boolean] a value indicating whether the application should automatically receive a token
|
20
20
|
# when an account is created, or not.
|
@@ -36,7 +36,7 @@ module Arkaan
|
|
36
36
|
length: { minimum: 6, message: 'minlength' },
|
37
37
|
uniqueness: { message: 'uniq' }
|
38
38
|
|
39
|
-
validates :
|
39
|
+
validates :app_key,
|
40
40
|
presence: { message: 'required' },
|
41
41
|
uniqueness: { message: 'uniq' }
|
42
42
|
|