Module: JekyllAuth::Helpers

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

Instance Method Summary collapse

Instance Method Details

#authentication_strategyObject



11
12
13
14
15
16
17
18
19
# File 'lib/jekyll_auth/helpers.rb', line 11

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_NAME"].to_s.blank?
    :org
  end
end

#whitelisted?Boolean

Returns:

  • (Boolean)


5
6
7
8
9
# File 'lib/jekyll_auth/helpers.rb', line 5

def whitelisted?
  return true if request.path_info == "/logout"

  !!(JekyllAuth.whitelist && JekyllAuth.whitelist.match(request.path_info))
end