two_factor_auth 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +634 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/two_factor_auth/application.js +13 -0
- data/app/assets/stylesheets/two_factor_auth/application.css +15 -0
- data/app/controllers/two_factor_auth/authentications_controller.rb +32 -0
- data/app/controllers/two_factor_auth/registrations_controller.rb +29 -0
- data/app/controllers/two_factor_auth/trusted_facets_controller.rb +10 -0
- data/app/controllers/two_factor_auth/two_factor_auth_controller.rb +19 -0
- data/app/helpers/two_factor_auth/application_helper.rb +21 -0
- data/app/helpers/two_factor_auth/authentications_helper.rb +17 -0
- data/app/helpers/two_factor_auth/registrations_helper.rb +17 -0
- data/app/models/two_factor_auth/authentication_client_data.rb +11 -0
- data/app/models/two_factor_auth/authentication_request.rb +30 -0
- data/app/models/two_factor_auth/authentication_response.rb +49 -0
- data/app/models/two_factor_auth/authentication_verifier.rb +68 -0
- data/app/models/two_factor_auth/client_data.rb +57 -0
- data/app/models/two_factor_auth/registration.rb +18 -0
- data/app/models/two_factor_auth/registration_request.rb +33 -0
- data/app/models/two_factor_auth/registration_response.rb +91 -0
- data/app/models/two_factor_auth/registration_verifier.rb +91 -0
- data/app/views/layouts/two_factor_auth/application.html.erb +16 -0
- data/app/views/two_factor_auth/authentications/new.html.erb +30 -0
- data/app/views/two_factor_auth/registrations/new.html.erb +26 -0
- data/config/routes.rb +3 -0
- data/lib/generators/templates/README +6 -0
- data/lib/generators/templates/initializer.rb +38 -0
- data/lib/generators/templates/migration.rb +15 -0
- data/lib/generators/two_factor_auth/install_generator.rb +32 -0
- data/lib/tasks/two_factor_auth_tasks.rake +13 -0
- data/lib/two_factor_auth/authentication_hook.rb +18 -0
- data/lib/two_factor_auth/engine.rb +5 -0
- data/lib/two_factor_auth/registration_hook.rb +17 -0
- data/lib/two_factor_auth/version.rb +3 -0
- data/lib/two_factor_auth.rb +155 -0
- data/test/controllers/two_factor_auth/authentications_controller_test.rb +70 -0
- data/test/controllers/two_factor_auth/registrations_controller_test.rb +57 -0
- data/test/controllers/two_factor_auth/trusted_facets_controller_test.rb +17 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/secrets_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/user.rb +8 -0
- data/test/dummy/app/views/layouts/application.html.erb +16 -0
- data/test/dummy/app/views/secrets/index.html.erb +10 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config/application.rb +24 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +78 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/assets.rb +8 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/devise.rb +259 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/two_factor_auth.rb +38 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/devise.en.yml +60 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20141026231953_devise_create_users.rb +42 -0
- data/test/dummy/db/migrate/20141224135949_create_two_factor_auth_registrations.rb +15 -0
- data/test/dummy/db/schema.rb +50 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +198 -0
- data/test/dummy/log/test.log +3490 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/helpers/two_factor_auth/authentication_helper_test.rb +54 -0
- data/test/helpers/two_factor_auth/registrations_helper_test.rb +34 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/lib/two_factor_auth_test.rb +169 -0
- data/test/models/two_factor_auth/authentication_request_test.rb +35 -0
- data/test/models/two_factor_auth/authentication_response_test.rb +44 -0
- data/test/models/two_factor_auth/authentication_verifier_test.rb +83 -0
- data/test/models/two_factor_auth/client_data_test.rb +79 -0
- data/test/models/two_factor_auth/registration_request_test.rb +29 -0
- data/test/models/two_factor_auth/registration_response_test.rb +87 -0
- data/test/models/two_factor_auth/registration_verifier_test.rb +96 -0
- data/test/test_helper.rb +43 -0
- metadata +351 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
|
3
|
+
# than English, add the necessary files in this directory.
|
|
4
|
+
#
|
|
5
|
+
# To use the locales, use `I18n.t`:
|
|
6
|
+
#
|
|
7
|
+
# I18n.t 'hello'
|
|
8
|
+
#
|
|
9
|
+
# In views, this is aliased to just `t`:
|
|
10
|
+
#
|
|
11
|
+
# <%= t('hello') %>
|
|
12
|
+
#
|
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
|
14
|
+
#
|
|
15
|
+
# I18n.locale = :es
|
|
16
|
+
#
|
|
17
|
+
# This would use the information in config/locales/es.yml.
|
|
18
|
+
#
|
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
|
21
|
+
|
|
22
|
+
en:
|
|
23
|
+
hello: "Hello world"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
|
5
|
+
|
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
|
9
|
+
|
|
10
|
+
# Make sure the secrets in this file are kept private
|
|
11
|
+
# if you're sharing your code publicly.
|
|
12
|
+
|
|
13
|
+
development:
|
|
14
|
+
secret_key_base: 17fde4f102299a5a3dda77cf13dfe5349357e7cb586f9ce961a6925f873822cc9be5f6a0151cfdfa8d35fe0bcbdf6e3993d2cf61b9434c34300d9ab67e5bf764
|
|
15
|
+
|
|
16
|
+
test:
|
|
17
|
+
secret_key_base: 4d40baee7a6c10ddd87e1ea6d49f036d7f5a58159792bc73fe5cde574e37897b9d4a297210173a638909dca67c646efdbb7ceb90b3e3621bd7f73f1c3b06453a
|
|
18
|
+
|
|
19
|
+
# Do not keep production secrets in the repository,
|
|
20
|
+
# instead read values from the environment.
|
|
21
|
+
production:
|
|
22
|
+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
|
Binary file
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
class DeviseCreateUsers < ActiveRecord::Migration
|
|
2
|
+
def change
|
|
3
|
+
create_table(:users) do |t|
|
|
4
|
+
## Database authenticatable
|
|
5
|
+
t.string :email, null: false, default: ""
|
|
6
|
+
t.string :encrypted_password, null: false, default: ""
|
|
7
|
+
|
|
8
|
+
## Recoverable
|
|
9
|
+
t.string :reset_password_token
|
|
10
|
+
t.datetime :reset_password_sent_at
|
|
11
|
+
|
|
12
|
+
## Rememberable
|
|
13
|
+
t.datetime :remember_created_at
|
|
14
|
+
|
|
15
|
+
## Trackable
|
|
16
|
+
t.integer :sign_in_count, default: 0, null: false
|
|
17
|
+
t.datetime :current_sign_in_at
|
|
18
|
+
t.datetime :last_sign_in_at
|
|
19
|
+
t.string :current_sign_in_ip
|
|
20
|
+
t.string :last_sign_in_ip
|
|
21
|
+
|
|
22
|
+
## Confirmable
|
|
23
|
+
# t.string :confirmation_token
|
|
24
|
+
# t.datetime :confirmed_at
|
|
25
|
+
# t.datetime :confirmation_sent_at
|
|
26
|
+
# t.string :unconfirmed_email # Only if using reconfirmable
|
|
27
|
+
|
|
28
|
+
## Lockable
|
|
29
|
+
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
|
|
30
|
+
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
|
31
|
+
# t.datetime :locked_at
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
t.timestamps
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
add_index :users, :email, unique: true
|
|
38
|
+
add_index :users, :reset_password_token, unique: true
|
|
39
|
+
# add_index :users, :confirmation_token, unique: true
|
|
40
|
+
# add_index :users, :unlock_token, unique: true
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class CreateTwoFactorAuthRegistrations < ActiveRecord::Migration
|
|
2
|
+
def change
|
|
3
|
+
create_table :two_factor_auth_registrations do |t|
|
|
4
|
+
t.references :login, polymorphic: true, null: false, index: true
|
|
5
|
+
t.binary :key_handle, null: false, limit: 65 # Defined in FIDO spec
|
|
6
|
+
t.binary :public_key, null: false, limit: 10.kilobytes
|
|
7
|
+
t.binary :certificate, null: false, limit: 1.megabyte, default: ""
|
|
8
|
+
t.integer :counter, null: false, limit: 5, default: 0 # limit in bytes; no easy way to get a 32b *unsigned*
|
|
9
|
+
t.timestamp :last_authenticated_at, null: false
|
|
10
|
+
t.timestamps
|
|
11
|
+
end
|
|
12
|
+
add_index :two_factor_auth_registrations, :key_handle
|
|
13
|
+
add_index :two_factor_auth_registrations, :last_authenticated_at
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
|
5
|
+
#
|
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
|
7
|
+
# database schema. If you need to create the application database on another
|
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
|
11
|
+
#
|
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
|
13
|
+
|
|
14
|
+
ActiveRecord::Schema.define(version: 20141224135949) do
|
|
15
|
+
|
|
16
|
+
create_table "two_factor_auth_registrations", force: true do |t|
|
|
17
|
+
t.integer "login_id", null: false
|
|
18
|
+
t.string "login_type", null: false
|
|
19
|
+
t.binary "key_handle", limit: 65, null: false
|
|
20
|
+
t.binary "public_key", limit: 10240, null: false
|
|
21
|
+
t.binary "certificate", limit: 1048576, default: "x''", null: false
|
|
22
|
+
t.integer "counter", limit: 5, default: 0, null: false
|
|
23
|
+
t.datetime "last_authenticated_at", null: false
|
|
24
|
+
t.datetime "created_at"
|
|
25
|
+
t.datetime "updated_at"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
add_index "two_factor_auth_registrations", ["key_handle"], name: "index_two_factor_auth_registrations_on_key_handle"
|
|
29
|
+
add_index "two_factor_auth_registrations", ["last_authenticated_at"], name: "index_two_factor_auth_registrations_on_last_authenticated_at"
|
|
30
|
+
add_index "two_factor_auth_registrations", ["login_id", "login_type"], name: "index_two_factor_auth_registrations_on_login_id_and_login_type"
|
|
31
|
+
|
|
32
|
+
create_table "users", force: true do |t|
|
|
33
|
+
t.string "email", default: "", null: false
|
|
34
|
+
t.string "encrypted_password", default: "", null: false
|
|
35
|
+
t.string "reset_password_token"
|
|
36
|
+
t.datetime "reset_password_sent_at"
|
|
37
|
+
t.datetime "remember_created_at"
|
|
38
|
+
t.integer "sign_in_count", default: 0, null: false
|
|
39
|
+
t.datetime "current_sign_in_at"
|
|
40
|
+
t.datetime "last_sign_in_at"
|
|
41
|
+
t.string "current_sign_in_ip"
|
|
42
|
+
t.string "last_sign_in_ip"
|
|
43
|
+
t.datetime "created_at"
|
|
44
|
+
t.datetime "updated_at"
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
add_index "users", ["email"], name: "index_users_on_email", unique: true
|
|
48
|
+
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
|
49
|
+
|
|
50
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
[1m[36m (22.0ms)[0m [1mCREATE TABLE "two_factor_auth_registrations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login_id" integer NOT NULL, "login_type" varchar(255) NOT NULL, "key_handle" blob(65) NOT NULL, "public_key" blob(10240) NOT NULL, "certificate" blob(1048576) DEFAULT x'782737383237323727' NOT NULL, "counter" integer(5) DEFAULT 0 NOT NULL, "last_authenticated_at" datetime NOT NULL, "created_at" datetime, "updated_at" datetime) [0m
|
|
2
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
|
3
|
+
[1m[36m (16.7ms)[0m [1mCREATE INDEX "index_two_factor_auth_registrations_on_key_handle" ON "two_factor_auth_registrations" ("key_handle")[0m
|
|
4
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
5
|
+
FROM sqlite_master
|
|
6
|
+
WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
|
|
7
|
+
UNION ALL
|
|
8
|
+
SELECT sql
|
|
9
|
+
FROM sqlite_temp_master
|
|
10
|
+
WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
|
|
11
|
+
|
|
12
|
+
[1m[36m (17.1ms)[0m [1mCREATE INDEX "index_two_factor_auth_registrations_on_last_authenticated_at" ON "two_factor_auth_registrations" ("last_authenticated_at")[0m
|
|
13
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
14
|
+
FROM sqlite_master
|
|
15
|
+
WHERE name='index_two_factor_auth_registrations_on_last_authenticated_at' AND type='index'
|
|
16
|
+
UNION ALL
|
|
17
|
+
SELECT sql
|
|
18
|
+
FROM sqlite_temp_master
|
|
19
|
+
WHERE name='index_two_factor_auth_registrations_on_last_authenticated_at' AND type='index'
|
|
20
|
+
|
|
21
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
22
|
+
FROM sqlite_master
|
|
23
|
+
WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
|
|
24
|
+
UNION ALL
|
|
25
|
+
SELECT sql
|
|
26
|
+
FROM sqlite_temp_master
|
|
27
|
+
WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
|
|
28
|
+
[0m
|
|
29
|
+
[1m[35m (17.0ms)[0m CREATE INDEX "index_two_factor_auth_registrations_on_login_id_and_login_type" ON "two_factor_auth_registrations" ("login_id", "login_type")
|
|
30
|
+
[1m[36m (18.4ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
|
31
|
+
[1m[35m (17.6ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
|
32
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
33
|
+
FROM sqlite_master
|
|
34
|
+
WHERE name='index_users_on_email' AND type='index'
|
|
35
|
+
UNION ALL
|
|
36
|
+
SELECT sql
|
|
37
|
+
FROM sqlite_temp_master
|
|
38
|
+
WHERE name='index_users_on_email' AND type='index'
|
|
39
|
+
[0m
|
|
40
|
+
[1m[35m (17.0ms)[0m CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
|
|
41
|
+
[1m[36m (19.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
|
42
|
+
[1m[35m (33.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
|
43
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
|
44
|
+
[1m[35m (17.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20141104134543')
|
|
45
|
+
[1m[36m (18.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20141026231953')[0m
|
|
46
|
+
[1m[36m (16.6ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
|
47
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
|
48
|
+
[1m[36m (18.3ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
|
49
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
50
|
+
Migrating to DeviseCreateUsers (20141026231953)
|
|
51
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
52
|
+
[1m[35m (0.5ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime, "updated_at" datetime)
|
|
53
|
+
[1m[36m (0.2ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")[0m
|
|
54
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
55
|
+
FROM sqlite_master
|
|
56
|
+
WHERE name='index_users_on_email' AND type='index'
|
|
57
|
+
UNION ALL
|
|
58
|
+
SELECT sql
|
|
59
|
+
FROM sqlite_temp_master
|
|
60
|
+
WHERE name='index_users_on_email' AND type='index'
|
|
61
|
+
|
|
62
|
+
[1m[36m (0.2ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
|
63
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141026231953"]]
|
|
64
|
+
[1m[36m (18.9ms)[0m [1mcommit transaction[0m
|
|
65
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
66
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
67
|
+
FROM sqlite_master
|
|
68
|
+
WHERE name='index_users_on_reset_password_token' AND type='index'
|
|
69
|
+
UNION ALL
|
|
70
|
+
SELECT sql
|
|
71
|
+
FROM sqlite_temp_master
|
|
72
|
+
WHERE name='index_users_on_reset_password_token' AND type='index'
|
|
73
|
+
[0m
|
|
74
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
75
|
+
FROM sqlite_master
|
|
76
|
+
WHERE name='index_users_on_email' AND type='index'
|
|
77
|
+
UNION ALL
|
|
78
|
+
SELECT sql
|
|
79
|
+
FROM sqlite_temp_master
|
|
80
|
+
WHERE name='index_users_on_email' AND type='index'
|
|
81
|
+
|
|
82
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
83
|
+
Migrating to CreateTwoFactorAuthRegistrations (20141224135949)
|
|
84
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
85
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "two_factor_auth_registrations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login_id" integer NOT NULL, "login_type" varchar(255) NOT NULL, "key_handle" blob(65) NOT NULL, "public_key" blob(10240) NOT NULL, "certificate" blob(1048576) DEFAULT x'' NOT NULL, "counter" integer(5) DEFAULT 0 NOT NULL, "last_authenticated_at" datetime NOT NULL, "created_at" datetime, "updated_at" datetime) [0m
|
|
86
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
|
87
|
+
[1m[36m (0.2ms)[0m [1mCREATE INDEX "index_two_factor_auth_registrations_on_login_id_and_login_type" ON "two_factor_auth_registrations" ("login_id", "login_type")[0m
|
|
88
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
89
|
+
FROM sqlite_master
|
|
90
|
+
WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
|
|
91
|
+
UNION ALL
|
|
92
|
+
SELECT sql
|
|
93
|
+
FROM sqlite_temp_master
|
|
94
|
+
WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
|
|
95
|
+
|
|
96
|
+
[1m[36m (0.2ms)[0m [1mCREATE INDEX "index_two_factor_auth_registrations_on_key_handle" ON "two_factor_auth_registrations" ("key_handle")[0m
|
|
97
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
98
|
+
FROM sqlite_master
|
|
99
|
+
WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
|
|
100
|
+
UNION ALL
|
|
101
|
+
SELECT sql
|
|
102
|
+
FROM sqlite_temp_master
|
|
103
|
+
WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
|
|
104
|
+
|
|
105
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
106
|
+
FROM sqlite_master
|
|
107
|
+
WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
|
|
108
|
+
UNION ALL
|
|
109
|
+
SELECT sql
|
|
110
|
+
FROM sqlite_temp_master
|
|
111
|
+
WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
|
|
112
|
+
[0m
|
|
113
|
+
[1m[35m (0.2ms)[0m CREATE INDEX "index_two_factor_auth_registrations_on_last_authenticated_at" ON "two_factor_auth_registrations" ("last_authenticated_at")
|
|
114
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20141224135949"]]
|
|
115
|
+
[1m[35m (247.2ms)[0m commit transaction
|
|
116
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
117
|
+
[1m[35m (0.2ms)[0m SELECT sql
|
|
118
|
+
FROM sqlite_master
|
|
119
|
+
WHERE name='index_two_factor_auth_registrations_on_last_authenticated_at' AND type='index'
|
|
120
|
+
UNION ALL
|
|
121
|
+
SELECT sql
|
|
122
|
+
FROM sqlite_temp_master
|
|
123
|
+
WHERE name='index_two_factor_auth_registrations_on_last_authenticated_at' AND type='index'
|
|
124
|
+
|
|
125
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
|
126
|
+
FROM sqlite_master
|
|
127
|
+
WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
|
|
128
|
+
UNION ALL
|
|
129
|
+
SELECT sql
|
|
130
|
+
FROM sqlite_temp_master
|
|
131
|
+
WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
|
|
132
|
+
[0m
|
|
133
|
+
[1m[35m (0.2ms)[0m SELECT sql
|
|
134
|
+
FROM sqlite_master
|
|
135
|
+
WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
|
|
136
|
+
UNION ALL
|
|
137
|
+
SELECT sql
|
|
138
|
+
FROM sqlite_temp_master
|
|
139
|
+
WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
|
|
140
|
+
|
|
141
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
142
|
+
FROM sqlite_master
|
|
143
|
+
WHERE name='index_users_on_reset_password_token' AND type='index'
|
|
144
|
+
UNION ALL
|
|
145
|
+
SELECT sql
|
|
146
|
+
FROM sqlite_temp_master
|
|
147
|
+
WHERE name='index_users_on_reset_password_token' AND type='index'
|
|
148
|
+
[0m
|
|
149
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
150
|
+
FROM sqlite_master
|
|
151
|
+
WHERE name='index_users_on_email' AND type='index'
|
|
152
|
+
UNION ALL
|
|
153
|
+
SELECT sql
|
|
154
|
+
FROM sqlite_temp_master
|
|
155
|
+
WHERE name='index_users_on_email' AND type='index'
|
|
156
|
+
|
|
157
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
158
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
159
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
160
|
+
FROM sqlite_master
|
|
161
|
+
WHERE name='index_two_factor_auth_registrations_on_last_authenticated_at' AND type='index'
|
|
162
|
+
UNION ALL
|
|
163
|
+
SELECT sql
|
|
164
|
+
FROM sqlite_temp_master
|
|
165
|
+
WHERE name='index_two_factor_auth_registrations_on_last_authenticated_at' AND type='index'
|
|
166
|
+
[0m
|
|
167
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
168
|
+
FROM sqlite_master
|
|
169
|
+
WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
|
|
170
|
+
UNION ALL
|
|
171
|
+
SELECT sql
|
|
172
|
+
FROM sqlite_temp_master
|
|
173
|
+
WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
|
|
174
|
+
|
|
175
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
|
176
|
+
FROM sqlite_master
|
|
177
|
+
WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
|
|
178
|
+
UNION ALL
|
|
179
|
+
SELECT sql
|
|
180
|
+
FROM sqlite_temp_master
|
|
181
|
+
WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
|
|
182
|
+
[0m
|
|
183
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
|
184
|
+
FROM sqlite_master
|
|
185
|
+
WHERE name='index_users_on_reset_password_token' AND type='index'
|
|
186
|
+
UNION ALL
|
|
187
|
+
SELECT sql
|
|
188
|
+
FROM sqlite_temp_master
|
|
189
|
+
WHERE name='index_users_on_reset_password_token' AND type='index'
|
|
190
|
+
|
|
191
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
|
192
|
+
FROM sqlite_master
|
|
193
|
+
WHERE name='index_users_on_email' AND type='index'
|
|
194
|
+
UNION ALL
|
|
195
|
+
SELECT sql
|
|
196
|
+
FROM sqlite_temp_master
|
|
197
|
+
WHERE name='index_users_on_email' AND type='index'
|
|
198
|
+
[0m
|