class BuntoAuth

Constants

VERSION

Public Class Methods

config() click to toggle source
# File lib/bunto_auth/config.rb, line 6
def self.config
  @config ||= begin
    config = YAML.safe_load_file(config_file)
    config["bunto_auth"] || {}
  rescue
    {}
  end
end
config_file() click to toggle source
# File lib/bunto_auth/config.rb, line 2
def self.config_file
  File.join(Dir.pwd, "_config.yml")
end
site() click to toggle source
# File lib/bunto-auth.rb, line 19
def self.site
  Rack::Builder.new do
    use BuntoAuth::AuthSite
    run BuntoAuth::BuntoSite
  end
end
ssl?() click to toggle source
# File lib/bunto_auth/config.rb, line 20
def self.ssl?
  !!BuntoAuth.config["ssl"]
end
whitelist() click to toggle source
# File lib/bunto_auth/config.rb, line 15
def self.whitelist
  whitelist = BuntoAuth.config["whitelist"]
  Regexp.new(whitelist.join("|")) unless whitelist.nil?
end