Class: Wework::Token::AppToken
- Inherits:
-
Base
- Object
- Base
- Wework::Token::AppToken
show all
- Defined in:
- lib/wework/token/app_token.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #token, #update_token
Instance Method Details
#redis_key ⇒ Object
7
8
9
|
# File 'lib/wework/token/app_token.rb', line 7
def redis_key
@redis_key ||= Digest::MD5.hexdigest "WX_APP_TOKEN_#{client.corp_id}_#{client.secret}"
end
|
#refresh_token ⇒ Object
15
16
17
|
# File 'lib/wework/token/app_token.rb', line 15
def refresh_token
client.request.get 'gettoken', params: {corpid: client.corp_id, corpsecret: client.secret}
end
|
#token_key ⇒ Object
11
12
13
|
# File 'lib/wework/token/app_token.rb', line 11
def token_key
'access_token'
end
|