Module: ActionCable::Connection::Authorization

Included in:
Base
Defined in:
lib/action_cable/connection/authorization.rb

Defined Under Namespace

Classes: UnauthorizedError

Instance Method Summary collapse

Instance Method Details

#reject_unauthorized_connectionObject

Closes the WebSocket connection if it is open and returns a 404 “File not Found” response.

Raises:



9
10
11
12
# File 'lib/action_cable/connection/authorization.rb', line 9

def reject_unauthorized_connection
  logger.error "An unauthorized connection attempt was rejected"
  raise UnauthorizedError
end