| @@ 171-177 (lines=7) @@ | ||
| 168 | helper_method :configured_providers |
|
| 169 | ||
| 170 | # Parses the url for the user domain |
|
| 171 | def parse_user_domain(hostname) |
|
| 172 | return hostname.split('.').first if Rails.configuration.url_host.empty? |
|
| 173 | Rails.configuration.url_host.split(',').each do |url_host| |
|
| 174 | return hostname.chomp(url_host).chomp('.') if hostname.include?(url_host) |
|
| 175 | end |
|
| 176 | '' |
|
| 177 | end |
|
| 178 | ||
| 179 | ||
| 180 | # Include user domain in lograge logs |
|
| @@ 58-64 (lines=7) @@ | ||
| 55 | end |
|
| 56 | ||
| 57 | # Parses the url for the user domain |
|
| 58 | def parse_user_domain(hostname) |
|
| 59 | return hostname.split('.').first if Rails.configuration.url_host.empty? |
|
| 60 | Rails.configuration.url_host.split(',').each do |url_host| |
|
| 61 | return hostname.chomp(url_host).chomp('.') if hostname.include?(url_host) |
|
| 62 | end |
|
| 63 | '' |
|
| 64 | end |
|
| 65 | ||
| 66 | # Generates a checksum to use alongside the omniauth request |
|
| 67 | def generate_checksum(user_domain, redirect_url, secret) |
|