Class: Wework::Token::CorpToken
- Inherits:
-
Base
- Object
- Base
- Wework::Token::CorpToken
show all
- Defined in:
- lib/wework/token/corp_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/corp_token.rb', line 7
def redis_key
@redis_key ||= Digest::MD5.hexdigest "WX_CORP_TOKEN_#{client.corp_id}_#{client.permanent_code}"
end
|
#refresh_token ⇒ Object
15
16
17
|
# File 'lib/wework/token/corp_token.rb', line 15
def refresh_token
client.suite.get_corp_token(client.corp_id, client.permanent_code)
end
|
#token_key ⇒ Object
11
12
13
|
# File 'lib/wework/token/corp_token.rb', line 11
def token_key
'access_token'
end
|