1 class ApiController < ApplicationController
2 skip_before_action :verify_authenticity_token
4 def deny_access(_exception)
7 report_error t("oauth.permissions.missing"), :forbidden
11 realm = "Web Password"
12 errormessage = "Couldn't authenticate you"
13 response.headers["WWW-Authenticate"] = "Basic realm=\"#{realm}\""
14 render :plain => errormessage, :status => :unauthorized