monkeypatch knock
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require './lib/knock_monkeypatch'
|
||||
|
||||
class Api::UserTokenController < Knock::AuthTokenController
|
||||
include Oath::ControllerHelpers
|
||||
|
||||
|
||||
7
lib/knock_monkeypatch.rb
Normal file
7
lib/knock_monkeypatch.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
module Knock
|
||||
class AuthTokenController < ApplicationController
|
||||
skip_before_action :authenticate
|
||||
alias authenticate_with_token authenticate
|
||||
before_action :authenticate_with_token
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user