Sha256: 9f31c4f1f7ca1532f166ad6a42fed27ec99594cb7289106369879566d3148889

Contents?: true

Size: 416 Bytes

Versions: 15

Compression:

Stored size: 416 Bytes

Contents

require 'wework/token/base'

require 'wework/token/base'

module Wework
  module Token
    class JsTicket < Base

      alias_method :ticket, :token

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

      def token_key
        'ticket'
      end

      def refresh_token
        client.get 'get_jsapi_ticket'
      end

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
wework-1.2.8 lib/wework/token/js_ticket.rb
wework-1.2.5 lib/wework/token/js_ticket.rb
wework-1.2.3 lib/wework/token/js_ticket.rb
wework-1.2.2 lib/wework/token/js_ticket.rb
wework-1.2.1 lib/wework/token/js_ticket.rb
wework-1.2.0 lib/wework/token/js_ticket.rb
wework-1.1.9 lib/wework/token/js_ticket.rb
wework-1.1.8 lib/wework/token/js_ticket.rb
wework-1.1.7 lib/wework/token/js_ticket.rb
wework-1.1.6 lib/wework/token/js_ticket.rb
wework-1.1.5 lib/wework/token/js_ticket.rb
wework-1.1.3 lib/wework/token/js_ticket.rb
wework-1.1.2 lib/wework/token/js_ticket.rb
wework-1.1.1 lib/wework/token/js_ticket.rb
wework-1.1.0 lib/wework/token/js_ticket.rb