Method: Wechat::Token::AccessTokenBase#read_token
- Defined in:
-
lib/wechat/token/access_token_base.rb,
lib/generators/wechat/templates/config/initializers/wechat_redis_store.rb
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/wechat/token/access_token_base.rb', line 43 def read_token if record_based_token? throw_error_if_missing_attributes! { 'access_token' => record.access_token, 'got_token_at' => record.got_token_at, 'token_expires_in' => record.token_expires_in } else JSON.parse(File.read(token_file)) end end |