monkeypatch knock

This commit is contained in:
Bilal
2020-08-03 15:28:22 +02:00
parent 566f8dae05
commit 69d4ef0fb2
2 changed files with 11 additions and 0 deletions

View File

@@ -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
View 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