Class: Lark::TokenStore::IsvTenantToken
- Inherits:
-
Base
- Object
- Base
- Lark::TokenStore::IsvTenantToken
show all
- Defined in:
- lib/lark/token_store/isv_tenant_token.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #token, #update_token, #valid?
Instance Method Details
#fetch_token ⇒ Object
10
11
12
13
14
15
|
# File 'lib/lark/token_store/isv_tenant_token.rb', line 10
def fetch_token
client.request.post 'auth/v3/tenant_access_token/', {
app_access_token: client.app_access_token,
tenant_key: client.tenant_key
}
end
|
#redis_key ⇒ Object
17
18
19
|
# File 'lib/lark/token_store/isv_tenant_token.rb', line 17
def redis_key
@redis_key ||= Digest::MD5.hexdigest "#{self.class.name}_#{client.app_id}_#{client.app_secret}_#{client.tenant_key}"
end
|
#token_key ⇒ Object
6
7
8
|
# File 'lib/lark/token_store/isv_tenant_token.rb', line 6
def token_key
'tenant_access_token'
end
|