Api Token: store token in an encrypted form

This commit is contained in:
simon lehericey 2018-08-24 16:45:43 +02:00
parent 1997f45d7e
commit 8c4f8347ca
7 changed files with 34 additions and 13 deletions

View file

@ -0,0 +1,5 @@
class AddEncryptedTokenColumnToAdministrateur < ActiveRecord::Migration[5.2]
def change
add_column :administrateurs, :encrypted_token, :string
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2018_09_24_074121) do
ActiveRecord::Schema.define(version: 2018_09_25_084403) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -53,6 +53,7 @@ ActiveRecord::Schema.define(version: 2018_09_24_074121) do
t.string "api_token"
t.boolean "active", default: false
t.jsonb "features", default: {}, null: false
t.string "encrypted_token"
t.index ["email"], name: "index_administrateurs_on_email", unique: true
t.index ["reset_password_token"], name: "index_administrateurs_on_reset_password_token", unique: true
end