Sha256: 241a8b2e81c90532f1a6faea0ff4f92a6d983a384ef1383a485c8ca853a38855

Contents?: true

Size: 272 Bytes

Versions: 6

Compression:

Stored size: 272 Bytes

Contents

module ApplicationCable
  class Connection < ActionCable::Connection::Base
    identified_by :current_user

    def connect
      self.current_user = find_verified_user
    end

    protected

    def find_verified_user
      SecureRandom.urlsafe_base64
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
self-auth-rails-0.1.6 app/channels/application_cable/connection.rb
self-auth-rails-0.1.5 app/channels/application_cable/connection.rb
self-auth-rails-0.1.4 app/channels/application_cable/connection.rb
self-auth-rails-0.1.3 app/channels/application_cable/connection.rb
self-auth-rails-0.1.2 app/channels/application_cable/connection.rb
self-auth-rails-0.1.1 app/channels/application_cable/connection.rb