Sha256: 304b90a37208756460d0dfa75792b7d8c3d97b242c2770ac12c61bcbfb9836a1
Contents?: true
Size: 375 Bytes
Versions: 2
Compression:
Stored size: 375 Bytes
Contents
module Jobshop module AuthenticationHandler extend ActiveSupport::Concern class InvalidCredentials < StandardError; end included do rescue_from AuthenticationHandler::InvalidCredentials, with: :unauthorized end private def unauthorized(e) render({ json: { message: "Invalid credentials #{e.message}" } }, :unauthorized) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jobshop-0.0.163 | app/controllers/concerns/jobshop/authentication_handler.rb |
jobshop-0.0.157 | app/controllers/concerns/jobshop/authentication_handler.rb |