Class: Hippo::API::Cable::Connection
- Inherits:
-
ActionCable::Connection::Base
- Object
- ActionCable::Connection::Base
- Hippo::API::Cable::Connection
- Defined in:
- lib/hippo/api/cable.rb
Instance Method Summary collapse
Instance Method Details
#connect ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/hippo/api/cable.rb', line 16 def connect token = request.params['token'] begin self.current_user = User.for_jwt_token(token) if token rescue JWT::DecodeError end unless self.current_user Hippo.logger.warn("Rejecting ws connection due to unauthorized access") end end |