arkaan 0.5.8 → 0.5.9
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.rb +2 -0
- data/lib/arkaan/authentication/session.rb +10 -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: f28e5b8c082bd71145df0d5844b693a7ebc96091
|
4
|
+
data.tar.gz: 3352fe590cbf35a24eb1aa969217b0a879c0b9fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f198c2928bdc582bf0377a34b3352323491da90f0c2f82a1dd9fd51d080fe708920c1ee751a77954f759bca39a5d1cb3bf95bc19388af1aca3ea608ccdf20588
|
7
|
+
data.tar.gz: b19948992679adfae8e520346fedbecc80ff971991849df1efef5de4e68f05d4ebe133fa080a3320bc665dabbe1ff4b2cc85fa29ff12d5c71f3068f69707f5f6
|
@@ -1,13 +1,22 @@
|
|
1
1
|
module Arkaan
|
2
2
|
module Authentication
|
3
|
+
# A session represents the connection of the user on our frontend application. Nobody else than our frontend should
|
4
|
+
# have access to the session or it's content (in particular to the token), instead they shall use the OAuth2.0 protocol.
|
5
|
+
# A session shall ONLY be created by a premium application (only our frontend applications are premium).
|
6
|
+
# @author Vincent Courtois <courtois.vincent@outlook.com>
|
3
7
|
class Session
|
4
8
|
include Mongoid::Document
|
5
9
|
include Mongoid::Timestamps
|
6
10
|
|
11
|
+
# @!attribute [rw] token
|
12
|
+
# @return [String] the unique token for this session, used to identify it and be sure the user is connected on this application.
|
7
13
|
field :token, type: String
|
8
|
-
|
14
|
+
# @!attribute [rw] expiration
|
15
|
+
# @return [Integer] the time of expiration of the session, in seconds.
|
9
16
|
field :expiration, type: Integer, default: 0
|
10
17
|
|
18
|
+
# @!attribute [rw] account
|
19
|
+
# @return [Arkaan::Account] the account connected to the application.
|
11
20
|
belongs_to :account, class_name: 'Arkaan::Account', inverse_of: :sessions
|
12
21
|
|
13
22
|
validates :token,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arkaan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Courtois
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|