module J1App
App in production mode
~/lib/j1_auth_manager/auth_manager/.rb Provides authentication services based on Warden|OmniAuth Product/Info: https://jekyll-one.com Copyright (C) 2019 Juergen Adams J1 Template is licensed under the MIT License. See: https://github.com/jekyll-one/j1_template_mde/blob/master/LICENSE
NOTES
~/lib/j1_auth_manager/auth_manager/.rb Provides authentication services based on Warden|OmniAuth Product/Info: https://jekyll-one.com Copyright (C) 2019 Juergen Adams J1 Template is licensed under the MIT License. See: https://github.com/jekyll-one/j1_template_mde/blob/master/LICENSE
NOTES
~/lib/j1_auth_manager/auth_manager/.rb Provides authentication services based on Warden|OmniAuth Product/Info: https://jekyll-one.com Copyright (C) 2019 Juergen Adams J1 Template is licensed under the MIT License. See: https://github.com/jekyll-one/j1_template_mde/blob/master/LICENSE
NOTES
~/lib/j1_app/j1_auth_manager/omniauth/strategies/helpers_disqus.rb
Provides helper methods for the disqus omniauth strategy
Product/Info: jekyll-one.com
Copyright (C) 2019 Juergen Adams
J1
Template is licensed under the MIT License See: github.com/jekyll-one/j1_template_mde/blob/master/LICENSE
NOTES
~/lib/j1_app/j1_auth_manager/omniauth/strategies/helpers_facebook.rb
Provides helper methods for the facebook omniauth strategy
Product/Info: jekyll-one.com
Copyright (C) 2019 Juergen Adams
J1
Template is licensed under the MIT License See: github.com/jekyll-one/j1_template_mde/blob/master/LICENSE
NOTES
~/lib/j1_app/j1_auth_manager/omniauth/strategies/helpers_github.rb
Provides helper methods for the github omniauth strategy
Product/Info: jekyll-one.com
Copyright (C) 2019 Juergen Adams
J1
Template is licensed under the MIT License See: github.com/jekyll-one/j1_template_mde/blob/master/LICENSE
NOTES
~/lib/j1_app/j1_auth_manager/omniauth/strategies/helpers_patreon.rb
Provides helper methods for the patreon omniauth strategy
Product/Info: jekyll-one.com
Copyright (C) 2019 Juergen Adams
J1
Template is licensed under the MIT License See: github.com/jekyll-one/j1_template_mde/blob/master/LICENSE
NOTES
~/lib/j1_app/j1_auth_manager/omniauth/strategies/helpers_twitter.rb
Provides helper methods for the twitter omniauth strategy
Product/Info: jekyll-one.com
Copyright (C) 2019 Juergen Adams
J1
Template is licensed under the MIT License See: github.com/jekyll-one/j1_template_mde/blob/master/LICENSE
NOTES
Public Class Methods
# File lib/j1_app/j1_auth_manager/config.rb, line 40 def self.active_providers auth_config['providers']['activated'] end
# File lib/j1_app/j1_auth_manager/config.rb, line 22 def self.auth? !!auth_config['enabled'] end
# File lib/j1_app/j1_auth_manager/config.rb, line 18 def self.auth_config jekyll_config.fetch('j1_auth', {}) end
# File lib/j1_app/j1_auth_manager/config.rb, line 69 def self.conditions (arg) condition_profile = {} provider = arg provider_conditions = auth_config['providers']["#{provider}"]['conditions'] provider_conditions.each do |key, value| condition_profile[key] = value end condition_profile end
# File lib/j1_app/j1_auth_manager/config.rb, line 3 def self.config_file File.join(Dir.pwd, '_config.yml') # File.join(Dir.pwd, "_config.develop.yml") end
# File lib/j1_app/j1_auth_manager/config.rb, line 44 def self.default_provider auth_config['providers']['activated'][0] end
# File lib/j1_app/j1_auth_manager/config.rb, line 14 def self.destination jekyll_config.fetch('destination', File.expand_path('_site', Dir.pwd)) end
# File lib/j1_app/j1_auth_manager/config.rb, line 65 def self.get_condition(arg) auth_config['provider']['condition']["#{arg}"] end
# File lib/j1_app/j1_auth_manager/config.rb, line 8 def self.jekyll_config @config ||= YAML.safe_load_file(config_file) rescue StandardError {} end
# File lib/j1_app/j1_auth_manager/config.rb, line 48 def self.permissions permission_profile = { :protected => [], :private => [] } active_providers = auth_config['providers']['activated'] for p in active_providers do provider_permissions = auth_config['providers']["#{p}"]['permissions'] provider_permissions.each do |perm| permission_profile[:"#{perm}"] << "#{p}" end end permission_profile end
# File lib/j1_app/j1_auth_manager/config.rb, line 35 def self.public_content public_content = auth_config['content']['public'] Regexp.new(public_content.join("|")) unless public_content.nil? end
# File lib/j1_app.rb, line 58 def self.site Rack::Builder.new do use Rack::ShowExceptions # Middleware. Generate web-based error pages (for Rack) use Rack::Deflater # Middleware. Enable gzip compression for ALL web servers out of Rack use J1App::AuthManager # Middleware. Support authentication methods using OmniAuth run J1App::SiteManager # Run J1App Manager to manage the (static) site as an (Rack-based) Web Application: end end
# File lib/j1_app/j1_auth_manager/config.rb, line 26 def self.ssl? !!auth_config['ssl'] end
# File lib/j1_app/j1_auth_manager/config.rb, line 30 def self.whitelist whitelist = auth_config['whitelist'] Regexp.new(whitelist.join("|")) unless whitelist.nil? end