Sha256: c636fbaa968dd899ef98eab7270db3ac85a54cad9ea802b9521d3d60994921fd

Contents?: true

Size: 427 Bytes

Versions: 1

Compression:

Stored size: 427 Bytes

Contents

require 'wework/token/base'

module Wework
  module Token
    class JsAgentTicket < Base

      alias_method :ticket, :token

      def redis_key
        @redis_key ||= Digest::MD5.hexdigest "WX_JS_AGENT_TICKET_#{client.corp_id}_#{client.agent_id}"
      end

      def token_key
        'ticket'
      end

      def refresh_token
        client.get 'ticket/get', params: { type: 'agent_config' }
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wework-next-1.2.6 lib/wework/token/js_agent_ticket.rb