From feb9703620c923a49e3b86d39d7c0c3400d70d53 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Tue, 7 Oct 2014 20:28:49 +0200 Subject: [PATCH] Remove old authentication code (browser-id, github, twitter) --- Gemfile | 4 - Gemfile.lock | 42 -- app/assets/javascripts/application.js | 1 - app/assets/javascripts/persona.js.coffee | 31 -- app/assets/stylesheets/application.css | 1 - app/controllers/account_merges_controller.rb | 26 -- app/controllers/application_controller.rb | 4 - app/decorators/omni_auth_credentials.rb | 21 - app/helpers/application_helper.rb | 13 - app/views/layouts/application.html.slim | 6 - config/cfg.rb | 9 +- config/initializers/assets.rb | 2 +- config/initializers/omniauth.rb | 9 - .../account_merges_controller_spec.rb | 65 --- spec/decorators/omni_auth_credentials_spec.rb | 40 -- spec/factories/users.rb | 1 - spec/helpers/application_helper_spec.rb | 32 -- spec/rails_helper.rb | 2 - spec/support/feature_helpers.rb | 18 - vendor/assets/images/auth-icons.png | Bin 7306 -> 0 bytes vendor/assets/javascripts/persona-include.js | 8 - .../assets/stylesheets/auth-buttons.css.scss | 376 ------------------ 22 files changed, 2 insertions(+), 709 deletions(-) delete mode 100644 app/assets/javascripts/persona.js.coffee delete mode 100644 app/controllers/account_merges_controller.rb delete mode 100644 app/decorators/omni_auth_credentials.rb delete mode 100644 config/initializers/omniauth.rb delete mode 100644 spec/controllers/account_merges_controller_spec.rb delete mode 100644 spec/decorators/omni_auth_credentials_spec.rb delete mode 100644 vendor/assets/images/auth-icons.png delete mode 100644 vendor/assets/javascripts/persona-include.js delete mode 100644 vendor/assets/stylesheets/auth-buttons.css.scss diff --git a/Gemfile b/Gemfile index 118d564..2c89c92 100644 --- a/Gemfile +++ b/Gemfile @@ -9,10 +9,6 @@ gem 'jquery-rails', '~> 3.0.4' gem 'pg', '~> 0.14' gem 'carrierwave', '~> 0.8.0' -gem 'omniauth', '~> 1.1.4' -gem 'omniauth-twitter', '~> 0.0.16' -gem 'omniauth-github', '~> 1.1.0' -gem 'omniauth-browserid', git: 'https://github.com/callahad/omniauth-browserid.git' gem 'kaminari', '~> 0.14.1' gem 'bugsnag', '~> 2.2.1' gem 'draper', '~> 1.3.1' diff --git a/Gemfile.lock b/Gemfile.lock index 9484883..51b72fa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,3 @@ -GIT - remote: https://github.com/callahad/omniauth-browserid.git - revision: c594029ddf92661b9cf6f04374683981f25471c2 - specs: - omniauth-browserid (0.0.1) - faraday - multi_json - omniauth (~> 1.0) - GEM remote: https://rubygems.org/ specs: @@ -110,8 +101,6 @@ GEM factory_girl_rails (4.2.1) factory_girl (~> 4.2.0) railties (>= 3.0.0) - faraday (0.8.8) - multipart-post (~> 1.2.0) ffi (1.9.3) fog (1.9.0) builder @@ -136,13 +125,11 @@ GEM guard-rspec (4.3.1) guard (~> 2.1) rspec (>= 2.14, < 4.0) - hashie (2.0.5) highline (1.6.19) hike (1.2.3) httparty (0.13.1) json (~> 1.8) multi_xml (>= 0.5.2) - httpauth (0.2.0) i18n (0.6.11) ice_nine (0.11.0) jasmine-core (1.3.1) @@ -154,8 +141,6 @@ GEM railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) json (1.8.1) - jwt (0.1.8) - multi_json (>= 1.5) kaminari (0.14.1) actionpack (>= 3.0.0) activesupport (>= 3.0.0) @@ -173,7 +158,6 @@ GEM minitest (5.4.1) multi_json (1.10.1) multi_xml (0.5.5) - multipart-post (1.2.0) net-scp (1.0.4) net-ssh (>= 1.99.1) net-sftp (2.1.2) @@ -183,28 +167,6 @@ GEM net-ssh (>= 2.6.5) newrelic_rpm (3.7.1.182) nokogiri (1.5.11) - oauth (0.4.7) - oauth2 (0.8.1) - faraday (~> 0.8) - httpauth (~> 0.1) - jwt (~> 0.1.4) - multi_json (~> 1.0) - rack (~> 1.2) - omniauth (1.1.4) - hashie (>= 1.2, < 3) - rack - omniauth-github (1.1.1) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-oauth (1.0.1) - oauth - omniauth (~> 1.0) - omniauth-oauth2 (1.1.1) - oauth2 (~> 0.8.0) - omniauth (~> 1.0) - omniauth-twitter (0.0.18) - multi_json (~> 1.3) - omniauth-oauth (~> 1.0) open4 (1.3.0) parallel (0.7.1) pg (0.17.0) @@ -391,10 +353,6 @@ DEPENDENCIES jquery-rails (~> 3.0.4) kaminari (~> 0.14.1) newrelic_rpm - omniauth (~> 1.1.4) - omniauth-browserid! - omniauth-github (~> 1.1.0) - omniauth-twitter (~> 0.0.16) open4 (~> 1.3.0) pg (~> 0.14) poltergeist (~> 1.5.0) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 60d4dec..c95ec30 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -7,7 +7,6 @@ //= require base //= require jquery_ujs //= require jquery.timeago -//= require persona //= require bootstrap $(function() { diff --git a/app/assets/javascripts/persona.js.coffee b/app/assets/javascripts/persona.js.coffee deleted file mode 100644 index 3e426d6..0000000 --- a/app/assets/javascripts/persona.js.coffee +++ /dev/null @@ -1,31 +0,0 @@ -$ -> - $('#persona-button, #log-in').click (event) -> - event.preventDefault() - navigator.id.request { - siteName: 'Asciinema', - siteLogo: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAABlBMVEUAAAD///+l2Z/dAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wHGBMiFVqqanYAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVRo3u3KoQEAAAgDoP3/tBaD0WiATAJwVIsgCIIgCIIgCIIgCIIgCIIgCMKHADAafyL3ebnQxskAAAAASUVORK5CYII=', - backgroundColor: '#06989a', - privacyPolicy: 'https://asciinema.org/privacy', - termsOfService: 'https://asciinema.org/tos' - } - - if window.browserIdUser - $('header .logout').click (event) -> - event.preventDefault() - navigator.id.logout() - - navigator.id.watch - loggedInUser: window.browserIdUser - - onlogin: (assertion) -> - if assertion - form = $( - "
" + - "" - ) - - $('body').append form - form.submit() - - onlogout: -> - window.location = '/logout' diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index e367425..6872620 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -1,6 +1,5 @@ /* *= require bootstrap - *= require auth-buttons *= require source-sans-pro *= require base *= require header diff --git a/app/controllers/account_merges_controller.rb b/app/controllers/account_merges_controller.rb deleted file mode 100644 index a6a4884..0000000 --- a/app/controllers/account_merges_controller.rb +++ /dev/null @@ -1,26 +0,0 @@ -class AccountMergesController < ApplicationController - - def create - user = find_user - - if user - user.update_attribute(:email, store.delete(:new_user_email)) - self.current_user = user - redirect_back_or_to root_url, notice: 'Welcome back!' - else - redirect_to new_user_path, - alert: 'Sorry, no account found. Try a different provider.' - end - end - - private - - def store - session - end - - def find_user - User.for_credentials(omniauth_credentials) - end - -end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a08d888..bdb0431 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -26,10 +26,6 @@ class ApplicationController < ActionController::Base handle_unauthenticated unless current_user end - def omniauth_credentials - OmniAuthCredentials.new(request.env['omniauth.auth']) - end - def store_location session[:return_to] = request.path end diff --git a/app/decorators/omni_auth_credentials.rb b/app/decorators/omni_auth_credentials.rb deleted file mode 100644 index 2e332ec..0000000 --- a/app/decorators/omni_auth_credentials.rb +++ /dev/null @@ -1,21 +0,0 @@ -class OmniAuthCredentials - - attr_reader :omniauth_hash - - def initialize(omniauth_hash) - @omniauth_hash = omniauth_hash - end - - def provider - omniauth_hash['provider'] - end - - def uid - omniauth_hash['uid'] - end - - def email - omniauth_hash['info'] && omniauth_hash['info']['email'] - end - -end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index db046da..9f896e1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -25,19 +25,6 @@ module ApplicationHelper end end - def twitter_auth_path - "/auth/twitter" - end - - def github_auth_path - "/auth/github" - end - - def browser_id_user - email = current_user && current_user.email || session[:new_user_email] - email ? "'#{email}'".html_safe : 'null' - end - def category_links(current_category, &blk) links = CategoryLinks.new(current_category, self) diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index d2bb440..25faca1 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -8,14 +8,8 @@ html[lang="en"] = stylesheet_link_tag "application", :media => "all" = javascript_include_tag "application" = javascript_include_tag "player" - - if CFG.local_persona_js? - = javascript_include_tag "persona-include.js" - - else - = javascript_include_tag "https://login.persona.org/include.js" = favicon_link_tag 'favicon.png' = render 'layouts/ga' - script - | window.browserIdUser = #{browser_id_user}; body = render 'layouts/header' = render 'shared/flash' diff --git a/config/cfg.rb b/config/cfg.rb index 2e9cf1b..eaab56e 100644 --- a/config/cfg.rb +++ b/config/cfg.rb @@ -10,22 +10,15 @@ module Asciinema attribute :aws_secret_access_key, String attribute :carrierwave_storage, String, default: 'file' attribute :carrierwave_storage_dir_prefix, String, default: 'uploads/' - attribute :github_consumer_key, String - attribute :github_consumer_secret, String attribute :google_analytics_id, String attribute :home_asciicast_id, Integer - attribute :local_persona_js, Boolean, default: false attribute :scheme, String, default: 'http' + attribute :host, String, default: 'localhost:3000' attribute :secret_token, String, default: '21deaa1a1228e119434aa783ecb4af21be7513ff1f5b8c1d8894241e5fc70ad395db72c8c1b0508a0ebb994ed88a8d73f6c84e44f7a4bc554a40d77f9844d2f4' - attribute :twitter_consumer_key, String - attribute :twitter_consumer_secret, String attribute :admin_ids, Array[Integer] - attribute :host, String, default: 'localhost:3000' attribute :smtp_settings, Hash attribute :from_email, String, default: "Asciinema " - alias_method :local_persona_js?, :local_persona_js - def home_asciicast asciicast = if home_asciicast_id Asciicast.find(home_asciicast_id) diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 98aa62f..ee71fc7 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -5,4 +5,4 @@ Rails.application.config.assets.version = '1.0' # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. -Rails.application.config.assets.precompile += %w( player.css player.js embed.css embed.js persona-include.js ) +Rails.application.config.assets.precompile += %w( player.css player.js embed.css embed.js ) diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb deleted file mode 100644 index 9bc0f89..0000000 --- a/config/initializers/omniauth.rb +++ /dev/null @@ -1,9 +0,0 @@ -Rails.application.config.middleware.use OmniAuth::Builder do - provider :twitter, CFG.twitter_consumer_key, CFG.twitter_consumer_secret, :client_options => { :ssl => { :ca_path => "/etc/ssl/certs" } } - provider :github, CFG.github_consumer_key, CFG.github_consumer_secret, :client_options => { :ssl => { :ca_path => "/etc/ssl/certs" } } - provider :browser_id -end - -OmniAuth.config.on_failure = Proc.new { |env| - OmniAuth::FailureEndpoint.new(env).redirect_to_failure -} diff --git a/spec/controllers/account_merges_controller_spec.rb b/spec/controllers/account_merges_controller_spec.rb deleted file mode 100644 index 3558a93..0000000 --- a/spec/controllers/account_merges_controller_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -require 'rails_helper' - -describe AccountMergesController do - - describe '#create' do - subject { get :create, provider: 'twitter' } - - let(:credentials) { double('credentials') } - let(:store) { {} } - - before do - allow(controller).to receive(:omniauth_credentials) { credentials } - allow(controller).to receive(:store) { store } - allow(User).to receive(:for_credentials).with(credentials) { user } - store[:new_user_email] = 'foo@bar.com' - end - - context "when user can be found for given credentials" do - let(:user) { stub_model(User) } - - before do - allow(user).to receive(:update_attribute) - allow(controller).to receive(:current_user=) - - subject - end - - it 'updates the email on the user' do - expect(user).to have_received(:update_attribute). - with(:email, 'foo@bar.com') - end - - it 'removes the email from the store' do - expect(store.key?(:new_user_email)).to be(false) - end - - it 'sets the current_user' do - expect(controller).to have_received(:current_user=).with(user) - end - - it 'redirects to the root_path with a notice' do - expect(flash[:notice]).to_not be_blank - should redirect_to(root_path) - end - end - - context "when user can't be found for given credentials" do - let(:user) { nil } - - before do - subject - end - - it "doesn't remove the email from the store" do - expect(store.key?(:new_user_email)).to be(true) - end - - it 'redirects to new user page with an alert' do - expect(flash[:alert]).to_not be_blank - should redirect_to(new_user_path) - end - end - end - -end diff --git a/spec/decorators/omni_auth_credentials_spec.rb b/spec/decorators/omni_auth_credentials_spec.rb deleted file mode 100644 index 91b4e00..0000000 --- a/spec/decorators/omni_auth_credentials_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'rails_helper' - -describe OmniAuthCredentials do - - let(:credentials) { described_class.new(omniauth_hash) } - - let(:omniauth_hash) { { - 'provider' => 'twitter', - 'uid' => '1234567', - 'info' => { 'email' => 'foo@bar.com' } - } } - - describe '#provider' do - subject { credentials.provider } - - it { should eq('twitter') } - end - - describe '#uid' do - subject { credentials.uid } - - it { should eq('1234567') } - end - - describe '#email' do - subject { credentials.email } - - it { should eq('foo@bar.com') } - - context "when no info section in hash" do - let(:omniauth_hash) { { - 'provider' => 'twitter', - 'uid' => '1234567' - } } - - it { should be(nil) } - end - end - -end diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 29a29fe..1b87ec7 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -1,7 +1,6 @@ # Read about factories at http://github.com/thoughtbot/factory_girl FactoryGirl.define do - sequence(:uid) { |n| n } sequence(:username) { |n| "user#{n}" } factory :user do diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 44b85fe..f9a8fb6 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -1,36 +1,4 @@ require 'rails_helper' describe ApplicationHelper do - - describe '#browser_id_user' do - let(:session) { {} } - - subject { helper.browser_id_user } - - before do - allow(helper).to receive(:session) { session } - allow(helper).to receive(:current_user) { user } - end - - context "when current_user is present" do - let(:user) { double('user', email: 'foo@bar.com') } - - it { should eq("'foo@bar.com'".html_safe) } - end - - context "when current_user isn't present" do - let(:user) { nil } - - it { should eq('null') } - - context "when new_user_email is present in session" do - before do - session[:new_user_email] = 'qux@quux.com' - end - - it { should eq("'qux@quux.com'".html_safe) } - end - end - end - end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index a1abb97..b761c29 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -29,8 +29,6 @@ Dir[Rails.root.join("spec/shared/**/*.rb")].each { |f| require f } Capybara.javascript_driver = :poltergeist -OmniAuth.config.test_mode = true - CarrierWave.configure do |config| config.storage = :file config.enable_processing = false diff --git a/spec/support/feature_helpers.rb b/spec/support/feature_helpers.rb index 77bda84..e5f8f02 100644 --- a/spec/support/feature_helpers.rb +++ b/spec/support/feature_helpers.rb @@ -15,23 +15,5 @@ module Asciinema expect(page).to have_link('FAQ') end - def set_omniauth(provider, opts = {}) - if opts[:message] - OmniAuth.config.mock_auth[provider] = opts[:message] - else - OmniAuth.config.mock_auth[provider] = OmniAuth::AuthHash.new({ - :provider => provider.to_s, - :uid => '123456', - :info => { :username => opts[:username] }, - :extra => { - :raw_info => { - :avatar_url => - 'http://gravatar.com/avatar/9cecfc695240b56e5d3c1a5dc3830967' - } - } - }) - end - end - end end diff --git a/vendor/assets/images/auth-icons.png b/vendor/assets/images/auth-icons.png deleted file mode 100644 index 00d3b032dd8e8c8d0e9d2ec72ae7086884849d59..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7306 zcmZvhbx;&goX0m8>TEL0BmfR8VSxRq2)z zX(nVY+R-uuq?y?OIu=J!7H`z4qd>C#ZLQvv`08a((4x5 zi5&s}IPdCdX_$x4?G{O7mfK9lYT%%XOh;Bsw9h{}rz!H&#`KjwKrt~yt6o|0(>~W} znYwZq{1IzpVX7y(=(xOXK9smG>ey$vpg8+f{n%h3xW+F;Fq7#;TM0xWFYiyYeMBh_L0tr*}&hF z!2t+}@De>1NiJHlEC>^m zNS__0r?>k_>DL?US%(0b(eFYiw+L}W9>Zy~%-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0X+2oM61iU}d-|6sgQ}7=?U}Ml0)3kz``W|H(9p`n#A*j)V$e z{h0EG1Pj(~Ke!bAq_etiVHxBX@H3x!U`%F&6z?X{guOzeNpRrFXEuoTqs?h)Rj~ub zY?6oP3oJxx{oVE~h4rO6MysRbCxY^Orn4~OlXLF@#?D{cB-xSoODGKAn7PYy85nlUD-CLrK@YNzxh9GL_PV764^;}wE{P#ak8Wdqb$5mI*#x-9~F zz8MGpANSwkIC8|qv`I}ECatLcPyLIrT20=?ZQv{Ey4M}^Bo#t8+2X8IfxtYphNdJ* zKZZXzx2$}Wy&{Bm_2>1z7c>zxe8sjOI*q03);0lYKFAJz4{cTuik)cwvd_6I`nObximD?;X?(TZD5{Mp>D z8zRf`oUoL*H`ZND8Dt=lqB9tb_ChRSgUnj(m(kopwy9)_-0?CmOl8MC-s8(!)#L|R zi?_limlKwp>gI1dCeq#Qv|TN(b3gYz(uO=2uzZ0jt7%6-nrew*J~7LyD8y~J72qcH z-PLc-)QC2xXQkMMXzZgEM>Uy6d#bGmTBW-WjlmdnyNX~Zr6~(PLL5Ye+A!0+()4x+JHM=s$ z!q=w$91XSo&C4673j4$$z0`5q6WJm`wyAKXiJ>VKm+zpXEtOgtDS4(8dUuJ{5PANC z-Jzg`^g~__3utb>A=$0&DJ#uy2!S@N_ezH12aNPmmp*hpNc5&MxhG)B(HtmoA~VuA z{ae>Y7W^BRCY%3GJP$zza=I)%Ady4Uv5S;b5Yj0^u93dr>JM+3TU8A|`>usN0$gji zjknNi#j(Xzsy?xT=h8P2V5U#aA_ttjoCN(o<@dNoR5{5V~I%|Ie0FD5nmE_d2HJ)!?*BAkM+D2N9 InogMi0NI~|$p8QV diff --git a/vendor/assets/javascripts/persona-include.js b/vendor/assets/javascripts/persona-include.js deleted file mode 100644 index 16341f2..0000000 --- a/vendor/assets/javascripts/persona-include.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Uncompressed source can be found at https://login.persona.org/include.orig.js - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -(function(){var a,b=function(){function f(a){return Array.isArray?Array.isArray(a):a.constructor.toString().indexOf("Array")!=-1}function e(a,b,d){var e=c[b][d];for(var f=0;f1)throw"scope may not contain double colons: '::'"}var k=function(){var a="",b="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";for(var c=0;c<5;c++)a+=b.charAt(Math.floor(Math.random()*b.length));return a}(),l={},m={},n={},o=!1,p=[],q=function(a,b,c){var d=!1,e=!1;return{origin:b,invoke:function(b,d){if(!n[a])throw"attempting to invoke a callback of a nonexistent transaction: "+a;var e=!1;for(var f=0;f0)for(var k=0;k=0;e--)try{if(c[e].location.href.indexOf(d)===0&&c[e].name===b)return c[e]}catch(f){}return}function i(a){/^https?:\/\//.test(a)||(a=window.location.href);var b=/^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(a);return b?b[1]:a}function h(){return window.JSON&&window.JSON.stringify&&window.JSON.parse&&window.postMessage}function g(){try{var a=navigator.userAgent;return a.indexOf("Fennec/")!=-1||a.indexOf("Firefox/")!=-1&&a.indexOf("Android")!=-1}catch(b){}return!1}function f(){var a=-1;if(navigator.appName==="Microsoft Internet Explorer"){var b=navigator.userAgent,c=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");c.exec(b)!=null&&(a=parseFloat(RegExp.$1))}return a>=8}function e(a,b,c){a.detachEvent?a.detachEvent("on"+b,c):a.removeEventListener&&a.removeEventListener(b,c,!1)}function d(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener&&a.addEventListener(b,c,!1)}var b="__winchan_relay_frame",c="die",k=f();return h()?{open:function(f,h){function s(a){if(a.origin===m)try{var b=JSON.parse(a.data);b.a==="ready"?n.postMessage(q,m):b.a==="error"?(r(),h&&(h(b.d),h=null)):b.a==="response"&&(r(),h&&(h(null,b.d),h=null))}catch(c){}}function r(){l&&document.body.removeChild(l),l=a,p&&(p=clearInterval(p)),e(window,"message",s),e(window,"unload",r);if(o)try{o.close()}catch(b){n.postMessage(c,m)}o=n=a}if(!h)throw"missing required callback argument";var j;f.url||(j="missing required 'url' parameter"),f.relay_url||(j="missing required 'relay_url' parameter"),j&&setTimeout(function(){h(j)},0),f.window_name||(f.window_name=null);if(!f.window_features||g())f.window_features=a;var l,m=i(f.url);if(m!==i(f.relay_url))return setTimeout(function(){h("invalid arguments: origin of url and relay_url must match")},0);var n;k&&(l=document.createElement("iframe"),l.setAttribute("src",f.relay_url),l.style.display="none",l.setAttribute("name",b),document.body.appendChild(l),n=l.contentWindow);var o=window.open(f.url,f.window_name,f.window_features);n||(n=o);var p=setInterval(function(){o&&o.closed&&(r(),h&&(h("unknown closed window"),h=null))},500),q=JSON.stringify({a:"request",d:f.params});d(window,"unload",r),d(window,"message",s);return{close:r,focus:function(){if(o)try{o.focus()}catch(a){}}}},onOpen:function(b){function l(a){if(a.data===c)try{window.close()}catch(b){}}function i(c){var d;try{d=JSON.parse(c.data)}catch(g){}!!d&&d.a==="request"&&(e(window,"message",i),f=c.origin,b&&setTimeout(function(){b(f,d.d,function(c){b=a,h({a:"response",d:c})})},0))}function h(a){a=JSON.stringify(a),k?g.doPost(a,f):g.postMessage(a,f)}var f="*",g=k?j():window.opener;if(!g)throw"can't find relay frame";d(k?g:window,"message",i),d(k?g:window,"message",l);try{h({a:"ready"})}catch(m){d(g,"load",function(a){h({a:"ready"})})}var n=function(){try{e(k?g:window,"message",l)}catch(c){}b&&h({a:"error",d:"client closed window"}),b=a;try{window.close()}catch(d){}};d(window,"unload",n);return{detach:function(){e(window,"unload",n)}}}}:{open:function(a,b,c,d){setTimeout(function(){d("unsupported browser")},0)},onOpen:function(a){setTimeout(function(){a("unsupported browser")},0)}}}();var c=function(){function l(){return c}function k(){c=g()||h()||i()||j();return!c}function j(){if(!(window.JSON&&window.JSON.stringify&&window.JSON.parse))return"JSON_NOT_SUPPORTED"}function i(){if(!a.postMessage)return"POSTMESSAGE_NOT_SUPPORTED"}function h(){try{var b="localStorage"in a&&a.localStorage!==null;if(b)a.localStorage.setItem("test","true"),a.localStorage.removeItem("test");else return"LOCALSTORAGE_NOT_SUPPORTED"}catch(c){return"LOCALSTORAGE_DISABLED"}}function g(){return f()}function f(){var a=e(),b=a>-1&&a<8;if(b)return"BAD_IE_VERSION"}function e(){var a=-1;if(b.appName=="Microsoft Internet Explorer"){var c=b.userAgent,d=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");d.exec(c)!=null&&(a=parseFloat(RegExp.$1))}return a}function d(c,d){b=c,a=d}var a=window,b=navigator,c;return{setTestEnv:d,isSupported:k,getNoSupportReason:l}}();navigator.id||(navigator.id={},navigator.mozId?navigator.id=navigator.mozId:navigator.id={});if(!navigator.id.request||navigator.id._shimmed){var d="https://login.persona.org",e=navigator.userAgent,f=e.indexOf("Fennec/")!=-1||e.indexOf("Firefox/")!=-1&&e.indexOf("Android")!=-1,g=f?a:"menubar=0,location=1,resizable=1,scrollbars=1,status=0,width=700,height=375",h=e.match(/CriOS/)||e.match(/Windows Phone/),i="WATCH_NEEDED",j="__persona_dialog",k,l={login:null,logout:null,match:null,ready:null},m,n=a;function o(b){b!==!0;if(n===a)n=b;else if(n!=b)throw new Error("you cannot combine the navigator.id.watch() API with navigator.id.getVerifiedEmail() or navigator.id.get()this site should instead use navigator.id.request() and navigator.id.watch()")}var p,q=!1,r=c.isSupported();function s(a){document.addEventListener?document.addEventListener("DOMContentLoaded",function b(){document.removeEventListener("DOMContentLoaded",b),a()},!1):document.attachEvent&&document.readyState&&document.attachEvent("onreadystatechange",function c(){var b=document.readyState;if(b==="loaded"||b==="complete"||b==="interactive")document.detachEvent("onreadystatechange",c),a()})}function t(){if(!!r){var c=window.document;if(!c.body){q||(s(t),q=!0);return}try{if(!p){var e=c.createElement("iframe");e.style.display="none",c.body.appendChild(e),e.src=d+"/communication_iframe",p=b.build({window:e.contentWindow,origin:d,scope:"mozid_ni",onReady:function(){p.call({method:"loaded",success:function(){l.ready&&l.ready()},error:function(){}})}}),p.bind("logout",function(a,b){l.logout&&l.logout()}),p.bind("login",function(a,b){l.login&&l.login(b)}),p.bind("match",function(a,b){l.match&&l.match()}),u(m)&&p.notify({method:"loggedInUser",params:m})}}catch(f){p=a}}}function u(a){return typeof a!="undefined"}function v(a){try{console.warn(a)}catch(b){}}function w(a,b){if(u(a[b])){v(b+" has been deprecated");return!0}}function x(a,b,c){if(u(a[b])&&u(a[c]))throw new Error("you cannot supply *both* "+b+" and "+c);w(a,b)&&(a[c]=a[b],delete a[b])}function y(a){if(typeof a=="object"){if(a.onlogin&&typeof a.onlogin!="function"||a.onlogout&&typeof a.onlogout!="function"||a.onmatch&&typeof a.onmatch!="function"||a.onready&&typeof a.onready!="function")throw new Error("non-function where function expected in parameters to navigator.id.watch()");if(!a.onlogin)throw new Error("'onlogin' is a required argument to navigator.id.watch()");if(!a.onlogout)throw new Error("'onlogout' is a required argument to navigator.id.watch()");l.login=a.onlogin||null,l.logout=a.onlogout||null,l.match=a.onmatch||null,l.ready=a.onready||null,x(a,"loggedInEmail","loggedInUser"),m=a.loggedInUser,t()}}var z;function A(){var a=z;a==="request"&&(l.ready?a="watch_with_onready":a="watch_without_onready");return a}function B(b){function r(){if(p)return p.call({method:"redirect_flow",params:JSON.stringify(b),success:function(){window.location=d+"/sign_in"}})}function n(){var a=c.getNoSupportReason();if(!a&&!e)return i}function m(){return c.isSupported()&&e}w(b,"requiredEmail"),x(b,"tosURL","termsOfService"),x(b,"privacyURL","privacyPolicy"),b.termsOfService&&!b.privacyPolicy&&v("termsOfService ignored unless privacyPolicy also defined"),b.privacyPolicy&&!b.termsOfService&&v("privacyPolicy ignored unless termsOfService also defined"),b.rp_api=A();var e=!h||z==="request";z=null,b.start_time=(new Date).getTime();if(k)try{k.focus()}catch(f){}else{if(!m()){var o=n(),q="unsupported_dialog";o==="LOCALSTORAGE_DISABLED"?q="cookies_disabled":o===i&&(q="unsupported_dialog_without_watch"),k=window.open(d+"/"+q,j,g);return}p&&p.notify({method:"dialog_running"});if(h)return r();k=WinChan.open({url:d+"/sign_in",relay_url:d+"/relay",window_features:g,window_name:j,params:{method:"get",params:b}},function(c,d){if(p){!c&&d&&d.email&&p.notify({method:"loggedInUser",params:d.email});var e=!(c||d&&d.assertion);p.notify({method:"dialog_complete",params:e})}k=a;if(!c&&d&&d.assertion)try{l.login&&l.login(d.assertion)}catch(f){console.log(f);throw f}if(c==="client closed window"||!d)b&&b.oncancel&&b.oncancel(),delete b.oncancel})}}navigator.id={request:function(a){if(this!=navigator.id)throw new Error("all navigator.id calls must be made on the navigator.id object");if(!l.login)throw new Error("navigator.id.watch must be called before navigator.id.request");a=a||{},o(!1),z="request",a.returnTo||(a.returnTo=document.location.pathname);return B(a)},watch:function(a){if(this!=navigator.id)throw new Error("all navigator.id calls must be made on the navigator.id object");o(!1),y(a)},logout:function(a){if(this!=navigator.id)throw new Error("all navigator.id calls must be made on the navigator.id object");t(),p&&p.notify({method:"logout"}),typeof a=="function"&&(v("navigator.id.logout callback argument has been deprecated."),setTimeout(a,0))},get:function(b,c){var d={};c=c||{},d.privacyPolicy=c.privacyPolicy||a,d.termsOfService=c.termsOfService||a,d.privacyURL=c.privacyURL||a,d.tosURL=c.tosURL||a,d.siteName=c.siteName||a,d.siteLogo=c.siteLogo||a,d.backgroundColor=c.backgroundColor||a,z=z||"get";w(c,"silent")?b&&setTimeout(function(){b(null)},0):(o(!0),y({onlogin:function(a){b&&(b(a),b=null)},onlogout:function(){}}),d.oncancel=function(){b&&(b(null),b=null),l.login=l.logout=l.match=l.ready=null},B(d))},getVerifiedEmail:function(a){v("navigator.id.getVerifiedEmail has been deprecated"),o(!0),z="getVerifiedEmail",navigator.id.get(a)},_shimmed:!0}}})() \ No newline at end of file diff --git a/vendor/assets/stylesheets/auth-buttons.css.scss b/vendor/assets/stylesheets/auth-buttons.css.scss deleted file mode 100644 index 318a502..0000000 --- a/vendor/assets/stylesheets/auth-buttons.css.scss +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Button Object - */ - -/* - * 1. Corrects inability to style clickable 'input' types in iOS - * 2. Remove excess padding in IE6/7 - * 3. IE6/7 inline-block hack for native block-level elements - */ - -.btn-auth { - position: relative; - display: inline-block; - height: 22px; - padding: 0 1em; - border: 1px solid #999; - border-radius: 2px; - margin: 0; - text-align: center; - text-decoration: none; - font-size: 14px; - line-height: 22px; - white-space: nowrap; - cursor: pointer; - color: #222; - background: #fff; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - /* iOS */ - -webkit-appearance: none; /* 1 */ - /* IE6/7 hacks */ - *overflow: visible; /* 2 */ - *display: inline; /* 3 */ - *zoom: 1; /* 3 */ -} - -.btn-auth:hover, -.btn-auth:focus, -.btn-auth:active { - color: #222; - text-decoration: none; -} - -.btn-auth:before { - content: ""; - float: left; - width: 22px; - height: 22px; - background: image-url("auth-icons.png") no-repeat 99px 99px; -} - -/* - * 36px - */ - -.btn-auth.large { - height: 36px; - line-height: 36px; - font-size: 20px; -} - -.btn-auth.large:before { - width: 36px; - height: 36px; -} - -/* - * Remove excess padding and border in FF3+ - */ - -.btn-auth::-moz-focus-inner { - border: 0; - padding: 0; -} - - -/* Facebook (extends .btn-auth) - ========================================================================== */ - -.btn-facebook { - border-color: #29447e; - border-bottom-color: #1a356e; - color: #fff; - background-color: #5872a7; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#637bad), to(#5872a7)); - background-image: -webkit-linear-gradient(#637bad, #5872a7); - background-image: -moz-linear-gradient(#637bad, #5872a7); - background-image: -ms-linear-gradient(#637bad, #5872a7); - background-image: -o-linear-gradient(#637bad, #5872a7); - background-image: linear-gradient(#637bad, #5872a7); - -webkit-box-shadow: inset 0 1px 0 #879ac0; - box-shadow: inset 0 1px 0 #879ac0; -} - -.btn-facebook:hover, -.btn-facebook:focus { - color: #fff; - background-color: #3b5998; -} - -.btn-facebook:active { - color: #fff; - background: #4f6aa3; - -webkit-box-shadow: inset 0 1px 0 #45619d; - box-shadow: inset 0 1px 0 #45619d; -} - -/* - * Icon - */ - -.btn-facebook:before { - border-right: 1px solid #465f94; - margin: 0 1em 0 -1em; - background-position: 0 0; -} - -.btn-facebook.large:before { - background-position: 0 -22px; -} - - -/* GitHub - ========================================================================== */ - -.btn-github { - border-color: #d4d4d4; - background: #ececec; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f4f4f4), to(#ececec)); - background-image: -webkit-linear-gradient(#f4f4f4, #ececec); - background-image: -moz-linear-gradient(#f4f4f4, #ececec); - background-image: -ms-linear-gradient(#f4f4f4, #ececec); - background-image: -o-linear-gradient(#f4f4f4, #ececec); - background-image: linear-gradient(#f4f4f4, #ececec); -} - -.btn-github:hover, -.btn-github:focus { - border-color: #518cc6; - border-bottom-color: #2a65a0; - color: #fff; - background-color: #599bdc; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#599bdc), to(#3072b3)); - background-image: -webkit-linear-gradient(#599bdc, #3072b3); - background-image: -moz-linear-gradient(#599bdc, #3072b3); - background-image: -ms-linear-gradient(#599bdc, #3072b3); - background-image: -o-linear-gradient(#599bdc, #3072b3); - background-image: linear-gradient(#599bdc, #3072b3); -} - -.btn-github:active { - border-color: #2A65A0; - border-bottom-color: #518CC6; - color: #fff; - background: #3072B3; - background: -webkit-gradient(linear, 0 0, 0 100%, from(#3072b3), to(#599bdc)); - background: -webkit-linear-gradient(#3072b3, #599bdc); - background: -moz-linear-gradient(#3072b3, #599bdc); - background: -ms-linear-gradient(#3072b3, #599bdc); - background: -o-linear-gradient(#3072b3, #599bdc); - background: linear-gradient(#3072b3, #599bdc); -} - -/* - * Icon - */ - -.btn-github:before { - margin: 0 0.6em 0 -0.6em; - background-position: -44px 0; -} - -.btn-github:hover:before, -.btn-github:focus:before, -.btn-github:active:before { - background-position: -66px 0; -} - -.btn-github.large:before { - background-position: -72px -22px; -} - -.btn-github.large:hover:before, -.btn-github.large:focus:before, -.btn-github.large:active:before { - background-position: -108px -22px; -} - - -/* Google - ========================================================================== */ - -.btn-google { - border-color: #3079ed; - color: #fff; - background: #4787ed; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4d90fe), to(#4787ed)); - background-image: -webkit-linear-gradient(#4d90fe, #4787ed); - background-image: -moz-linear-gradient(#4d90fe, #4787ed); - background-image: -ms-linear-gradient(#4d90fe, #4787ed); - background-image: -o-linear-gradient(#4d90fe, #4787ed); - background-image: linear-gradient(#4d90fe, #4787ed); -} - -.btn-google:hover, -.btn-google:focus, -.btn-google:active { - color: #fff; - background-color: #357ae8; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4d90fe), to(#357ae8)); - background-image: -webkit-linear-gradient(#4d90fe, #357ae8); - background-image: -moz-linear-gradient(#4d90fe, #357ae8); - background-image: -ms-linear-gradient(#4d90fe, #357ae8); - background-image: -o-linear-gradient(#4d90fe, #357ae8); - background-image: linear-gradient(#4d90fe, #357ae8); -} - -.btn-google:active { - -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3); - box-shadow: inset 0 1px 2px rgba(0,0,0,0.3); -} - -/* - * Icon - */ - -.btn-google:before { - margin: 0 1em 0 -1em; - background-position: -88px 0; - background-color: #e6e6e6; -} - -.btn-google.large:before { - background-position: -144px -22px; -} - - -/* Open ID - ========================================================================== */ - -.btn-openid:hover, -.btn-openid:focus { - border-color: #777; - background: #fcfcfc; -} - -.btn-openid:active { - background: #f5f5f5; -} - -/* - * Icon - */ - -.btn-openid:before { - margin: 0 0.6em 0 -0.6em; - background-position: -154px 0; -} - -.btn-openid.large:before { - background-position: -252px -22px; -} - - -/* Twitter - ========================================================================== */ - -.btn-twitter { - border-color: #a6cde6; - color: #327695; - background: #cfe4f0; - /* css3 */ - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f1f5f7), to(rgba(255,255,255,0))); - background-image: -webkit-linear-gradient(#f1f5f7, rgba(255,255,255,0)); - background-image: -moz-linear-gradient(#f1f5f7, rgba(255,255,255,0)); - background-image: -ms-linear-gradient(#f1f5f7, rgba(255,255,255,0)); - background-image: -o-linear-gradient(#f1f5f7, rgba(255,255,255,0)); - background-image: linear-gradient(#f1f5f7, rgba(255,255,255,0)); - -webkit-box-shadow: inset 0 1px 0 #fff; - box-shadow: inset 0 1px 0 #fff; -} - -.btn-twitter:hover, -.btn-twitter:focus, -.btn-twitter:active { - color: #327695; - border-color: #8dc2e4; - background-color: #cadde9; -} - -.btn-twitter:active { - background: #cadde9; - -webkit-box-shadow: inset 0 1px 0 #bbd6e7; - box-shadow: inset 0 1px 0 #bbd6e7; -} - -/* - * Icon - */ - -.btn-twitter:before { - margin: 0 0.6em 0 -0.6em; - background-position: -22px 0; -} - -.btn-twitter.large:before { - background-position: -36px -22px; -} - - -/* Windows Live ID - ========================================================================== */ - -.btn-windows:hover, -.btn-windows:focus { - border-color: #777; - background: #fcfcfc; -} - -.btn-windows:active { - background: #f5f5f5; -} - -/* - * Icon - */ - -.btn-windows:before { - margin: 0 0.6em 0 -0.6em; - background-position: -110px 0; -} - -.btn-windows.large:before { - background-position: -180px -22px; -} - - -/* Yahoo! - ========================================================================== */ - -.btn-yahoo { - border-color: #ffb305; - background: #ffc426; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,0.5)), to(rgba(255,255,255,0))); - background-image: -webkit-linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0)); - background-image: -moz-linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0)); - background-image: -ms-linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0)); - background-image: -o-linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0)); - background-image: linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0)); -} - -.btn-yahoo:hover, -.btn-yahoo:focus { - background-color: #fabf20; -} - -.btn-yahoo:active { - border-color: #f09700; - background-image: none; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.3); - box-shadow: inset 0 1px 1px rgba(0,0,0,0.3); -} - -/* - * Icon - */ - -.btn-yahoo:before { - margin: 0 0.6em 0 -0.6em; - background-position: -132px 0; -} - -.btn-yahoo.large:before { - background-position: -216px -22px; -}