Module: TwitterAuth::BasicUser
- Included in:
- GenericUser
- Defined in:
- app/models/twitter_auth/basic_user.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/models/twitter_auth/basic_user.rb', line 5 def self.included(base) base.class_eval do attr_accessor :crypted_password, :salt end base.extend TwitterAuth::BasicUser::ClassMethods end |
Instance Method Details
#password ⇒ Object
59 60 61 |
# File 'app/models/twitter_auth/basic_user.rb', line 59 def password TwitterAuth::Cryptify.decrypt(self.crypted_password, self.salt) end |
#password=(new_password) ⇒ Object
53 54 55 56 57 |
# File 'app/models/twitter_auth/basic_user.rb', line 53 def password=(new_password) encrypted = TwitterAuth::Cryptify.encrypt(new_password) self.crypted_password = encrypted[:encrypted_data] self.salt = encrypted[:salt] end |