Sha256: b97ea1fbd8ce595eebf34525838d7c4a1ec1d756f055d0953390ad89dc2aa89e
Contents?: true
Size: 483 Bytes
Versions: 5
Compression:
Stored size: 483 Bytes
Contents
module ProxyAuth # management methods used for server maintenance class RegisterServicesController < ApplicationController before_action :authenticate def create ProxyAuth::Token.instance.register_service head :ok end private def authenticate authenticate_with_http_basic do |user, password| secrets = Rails.application.secrets secrets.admin_login == user && secrets.admin_password == password end end end end
Version data entries
5 entries across 5 versions & 1 rubygems