Class: Wework::Token::JsAgentTicket
- Inherits:
-
Base
- Object
- Base
- Wework::Token::JsAgentTicket
show all
- Defined in:
- lib/wework/token/js_agent_ticket.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
9
10
11
|
# File 'lib/wework/token/js_agent_ticket.rb', line 9
def redis_key
@redis_key ||= Digest::MD5.hexdigest "WX_JS_AGENT_TICKET_#{client.corp_id}_#{client.agent_id}"
end
|
#refresh_token ⇒ Object
17
18
19
|
# File 'lib/wework/token/js_agent_ticket.rb', line 17
def refresh_token
client.get 'ticket/get', params: { type: 'agent_config' }
end
|
#token_key ⇒ Object
13
14
15
|
# File 'lib/wework/token/js_agent_ticket.rb', line 13
def token_key
'ticket'
end
|