Administrateur: do not save api_token in clear text anymore
This commit is contained in:
parent
16566b46c0
commit
88f7e888c3
3 changed files with 7 additions and 14 deletions
|
@ -39,7 +39,7 @@ class Administrateur < ApplicationRecord
|
|||
def renew_api_token
|
||||
api_token = Administrateur.generate_unique_secure_token
|
||||
encrypted_token = BCrypt::Password.create(api_token)
|
||||
update(api_token: api_token, encrypted_token: encrypted_token)
|
||||
update(encrypted_token: encrypted_token)
|
||||
api_token
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue