arkaan 0.5.8 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82ee7964343babf536cf19a69c722969b5d22e10
4
- data.tar.gz: 15bc5ff8dfd971385ceb02bc027b1aaad9ee348c
3
+ metadata.gz: f28e5b8c082bd71145df0d5844b693a7ebc96091
4
+ data.tar.gz: 3352fe590cbf35a24eb1aa969217b0a879c0b9fd
5
5
  SHA512:
6
- metadata.gz: c4e968e8158d51290d2e3172b864e5df82d010b34539222080b734ae24cc012fa81039ec7c5ba92812d6861e37d22e4f1322cb66ff687892ec9243d87e4935df
7
- data.tar.gz: 124bef470de7ea4010abd02b1d65cff7e930275a61a1a7200d02450a00c86ed76880762c151615ed8484145bea83517c20f03f97a80542285db3746896d98841
6
+ metadata.gz: f198c2928bdc582bf0377a34b3352323491da90f0c2f82a1dd9fd51d080fe708920c1ee751a77954f759bca39a5d1cb3bf95bc19388af1aca3ea608ccdf20588
7
+ data.tar.gz: b19948992679adfae8e520346fedbecc80ff971991849df1efef5de4e68f05d4ebe133fa080a3320bc665dabbe1ff4b2cc85fa29ff12d5c71f3068f69707f5f6
@@ -1,4 +1,6 @@
1
1
  module Arkaan
2
+ # This module holds the logic for user authentication to our frontend.
3
+ # @author Vincent Courtois <courtois.vincent@outlook.com>
2
4
  module Authentication
3
5
  autoload :Session, 'arkaan/authentication/session'
4
6
  end
@@ -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.8
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 00:00:00.000000000 Z
11
+ date: 2017-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec