Sha256: efbbc1a3374d887663df47e01113d1e54d3aad22632e2ae46abf0c23cfb3c224

Contents?: true

Size: 399 Bytes

Versions: 6

Compression:

Stored size: 399 Bytes

Contents

# frozen_string_literal: true
module Omniauth
  module Rails
    module Test
      module ControllerHelpers
        def sign_in(email)
          session["OmniauthRailsAuthData"] = { "email" => email }
        end

        def authenticated?
          session["OmniauthRailsAuthData"].present? &&
            session["OmniauthRailsAuthData"]["email"].present?
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
omniauth-rails-0.6.0 lib/omniauth/rails/test/controller_helpers.rb
omniauth-rails-0.5.0 lib/omniauth/rails/test/controller_helpers.rb
omniauth-rails-0.4.0 lib/omniauth/rails/test/controller_helpers.rb
omniauth-rails-0.3.0 lib/omniauth/rails/test/controller_helpers.rb
omniauth-rails-0.2.0 lib/omniauth/rails/test/controller_helpers.rb
omniauth-rails-0.1.0 lib/omniauth/rails/test/controller_helpers.rb