Sha256: 1492651e245718033f30c6fd24d80db1ef0aca6b2f96b994783a1c7c7861a811
Contents?: true
Size: 623 Bytes
Versions: 20
Compression:
Stored size: 623 Bytes
Contents
require "active_support/hash_with_indifferent_access" module Rails module Auth # Convenience methods designed to be included in an ActionController::Base subclass # Recommended use: include in ApplicationController module ControllerMethods # Obtain credentials for the current request # # @return [HashWithIndifferentAccess] credentials extracted from the environment # def credentials @_rails_auth_credentials ||= begin creds = Rails::Auth.credentials(request.env) HashWithIndifferentAccess.new(creds).freeze end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems