module Spina::Authentication::Basic
Public Instance Methods
logged_in?()
click to toggle source
# File lib/spina/authentication/basic.rb, line 10 def logged_in? authenticate end
Private Instance Methods
authenticate()
click to toggle source
# File lib/spina/authentication/basic.rb, line 16 def authenticate authenticate_or_request_with_http_basic do |username, password| username == Rails.application.credentials.dig(:spina, :username) && password == Rails.application.credentials.dig(:spina, :password) end end