Sha256: 7917ba8acb4f84b3d983c0efd295c3921486683025b31eb119177650588d6d77

Contents?: true

Size: 306 Bytes

Versions: 4

Compression:

Stored size: 306 Bytes

Contents

class ProtectedController < ApplicationController

  #before_action "authenticate_#{Rails.application.config.devise_oauth2_rails4.devise_scope}!"

  def index
    render :nothing => true, :status => :ok if current_oauth2_client
    render nothing: true, status: 401 unless current_oauth2_client
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
devise_oauth2_rails4-2.1.8 spec/dummy/app/controllers/protected_controller.rb
devise_oauth2_rails4-2.1.7 spec/dummy/app/controllers/protected_controller.rb
devise_oauth2_rails4-2.1.6 spec/dummy/app/controllers/protected_controller.rb
devise_oauth2_rails4-2.1.5 spec/dummy/app/controllers/protected_controller.rb