Sha256: 043c7d41c9a5224ad449769608cfc6034aeaa93c3b568c148c27121da05ddecf
Contents?: true
Size: 628 Bytes
Versions: 8
Compression:
Stored size: 628 Bytes
Contents
module ScimRails class ApplicationController < ActionController::API include ActionController::HttpAuthentication::Basic::ControllerMethods include ExceptionHandler include Response before_action :authorize_request private def authorize_request authenticate_with_http_basic do |username, password| authorization = AuthorizeApiRequest.new( searchable_attribute: username, authentication_attribute: password ) @company = authorization.company end raise ScimRails::ExceptionHandler::InvalidCredentials if @company.blank? end end end
Version data entries
8 entries across 8 versions & 1 rubygems