Sha256: 2d307868698f25b88ed51be9811cf135972fac844f92737484c3c8772cadc726

Contents?: true

Size: 526 Bytes

Versions: 6

Compression:

Stored size: 526 Bytes

Contents

class ScopedController < ActionController::Base
  def authenticate
    github_authenticate!(:admin)
    render nothing: true
  end

  def logout
    was_logged_in = !github_user(:admin).nil?
    github_logout(:admin)
    render text: was_logged_in
  end

  def authenticated
    render text: github_authenticated?(:admin)
  end

  def user
    render text: github_user(:admin)
  end

  def session
    if (session = github_session(:admin))
      session[:foo] = :bar
    end

    render text: github_session(:admin)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
warden-github-rails-1.2.2 spec/rails_app/app/controllers/scoped_controller.rb
warden-github-rails-1.2.1 spec/rails_app/app/controllers/scoped_controller.rb
warden-github-rails-1.2.0 spec/rails_app/app/controllers/scoped_controller.rb
warden-github-rails-1.1.2 spec/rails_app/app/controllers/scoped_controller.rb
warden-github-rails-1.1.1 spec/rails_app/app/controllers/scoped_controller.rb
warden-github-rails-1.1.0 spec/rails_app/app/controllers/scoped_controller.rb