Sha256: 1c2af34b5a7a6c0d9404a16d5ad020ae8c387f8d33bd507478e45ac3fdf926fb

Contents?: true

Size: 499 Bytes

Versions: 6

Compression:

Stored size: 499 Bytes

Contents

module DoorkeeperHub
  class CallbacksController < ActionController::Base
    def activation
      return if params[:access_token] != DoorkeeperHub.config.service_token
      # {name, access_token, doorkeeper_token, active, options}
      record = DoorkeeperHub.config.scope_model.constantize.find_or_initialize_by(
        DoorkeeperHub.token_name => params[DoorkeeperHub.token_name]
      )
      record.update active: params[:active], name: params[:name]
      render body: nil
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
doorkeeper_hub-0.3.3 app/controllers/doorkeeper_hub/callbacks_controller.rb
doorkeeper_hub-0.3.2 app/controllers/doorkeeper_hub/callbacks_controller.rb
doorkeeper_hub-0.3.1 app/controllers/doorkeeper_hub/callbacks_controller.rb
doorkeeper_hub-0.3.0 app/controllers/doorkeeper_hub/callbacks_controller.rb
doorkeeper_hub-0.2.9 app/controllers/doorkeeper_hub/callbacks_controller.rb
doorkeeper_hub-0.2.8 app/controllers/doorkeeper_hub/callbacks_controller.rb