Module: JekyllAuth::Helpers

Included in:
AuthSite
Defined in:
lib/jekyll_auth/helpers.rb

Instance Method Summary collapse

Instance Method Details

#authentication_strategyObject



8
9
10
11
12
13
14
15
16
# File 'lib/jekyll_auth/helpers.rb', line 8

def authentication_strategy
  if !ENV['GITHUB_TEAM_ID'].to_s.blank?
    :team
  elsif !ENV['GITHUB_TEAM_IDS'].to_s.blank?
    :teams
  elsif !ENV['GITHUB_ORG_ID'].to_s.blank?
    :org
  end
end

#whitelisted?Boolean

Returns:

  • (Boolean)


3
4
5
6
# File 'lib/jekyll_auth/helpers.rb', line 3

def whitelisted?
  return true if request.path_info == "/logout"
  !!(JekyllAuth.whitelist && JekyllAuth.whitelist.match(request.path_info))
end