Class: OauthAuthentication
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- OauthAuthentication
- Defined in:
- lib/generators/remotty/rails/templates/oauth_authentication.rb
Overview
OAuth Authentication 모델
Instance Method Summary collapse
-
#update_with_credential(credential) ⇒ Object
access_token, access_token_secret, expires 정보 업데이트.
Instance Method Details
#update_with_credential(credential) ⇒ Object
access_token, access_token_secret, expires 정보 업데이트
13 14 15 16 17 |
# File 'lib/generators/remotty/rails/templates/oauth_authentication.rb', line 13 def update_with_credential(credential) self.access_token = credential[:token] self.access_token_secret = credential[:secret] if credential[:secret] self.expires_at = Time.at(credential[:expires_at]).to_datetime if credential[:expires_at] end |