Sha256: 5049f7259ead9b545444ba4c45e53b450e2684aa57a237eb95bb0696e9d8acd3

Contents?: true

Size: 509 Bytes

Versions: 16

Compression:

Stored size: 509 Bytes

Contents

require 'wework/token/base'

module Wework
  module Token
    class SuiteToken < Base

      def redis_key
        @redis_key ||= Digest::MD5.hexdigest "WX_SUITE_TOKEN_#{client.suite_id}_#{client.suite_secret}_#{client.suite_token}"
      end

      def token_key
        'suite_access_token'
      end

      def refresh_token
        client.request.post 'service/get_suite_token', {suite_id: client.suite_id, suite_secret: client.suite_secret, suite_ticket: client.suite_ticket}
      end

    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

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