Commit 80df9ea7 by liyijie

Add password_raw= method

parent 13247601
...@@ -11,6 +11,10 @@ module RailsApiAuthentication ...@@ -11,6 +11,10 @@ module RailsApiAuthentication
AuthToken.find(token: token)&.first&.delete if token.present? AuthToken.find(token: token)&.first&.delete if token.present?
end end
def password_raw= password
self.update_password(password)
end
def update_password password def update_password password
raise(UserError.new(400, '-1', 'password is blank')) if password.blank? raise(UserError.new(400, '-1', 'password is blank')) if password.blank?
auth_password = self.class.auth_password auth_password = self.class.auth_password
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment