Class: Wework::Token::ProviderToken
- Inherits:
-
Base
- Object
- Base
- Wework::Token::ProviderToken
show all
- Defined in:
- lib/wework/token/provider_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/provider_token.rb', line 7
def redis_key
@redis_key ||= Digest::MD5.hexdigest "WX_PROVIDER_TOKEN_#{client.corp_id}_#{client.secret}"
end
|
#refresh_token ⇒ Object
15
16
17
|
# File 'lib/wework/token/provider_token.rb', line 15
def refresh_token
client.request.post 'service/get_provider_token', {corpid: client.corp_id, provider_secret: client.secret}
end
|
#token_key ⇒ Object
11
12
13
|
# File 'lib/wework/token/provider_token.rb', line 11
def token_key
'provider_access_token'
end
|