Class: Core::Models::Authentication::Session
- Inherits:
-
Object
- Object
- Core::Models::Authentication::Session
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/core/models/authentication/session.rb
Overview
A session represents the connection of the user on our frontend application. Nobody else than our frontend should have access to the session or it’s content (in particular to the token), instead they shall use the OAuth2.0 protocol. A session shall ONLY be created by a premium application (only our frontend applications are premium).
Instance Attribute Summary collapse
-
#account ⇒ Core::Models::Account
The account connected to the application.
-
#token ⇒ String
The unique token for this session, used to identify it and be sure the user is connected on this application.
-
#websocket_id ⇒ String
The ID of the websocket on which the session is connected.
Instance Attribute Details
#account ⇒ Core::Models::Account
23 |
# File 'lib/core/models/authentication/session.rb', line 23 belongs_to :account, class_name: 'Core::Models::Account', inverse_of: :sessions |
#token ⇒ String
16 |
# File 'lib/core/models/authentication/session.rb', line 16 field :token, type: String |
#websocket_id ⇒ String
19 |
# File 'lib/core/models/authentication/session.rb', line 19 field :websocket_id, type: String, default: '' |