Sha256: 4e2b8af7c206260f0121cac470c8ea9558be9f03b8a8ab070012d577e0e5a4db

Contents?: true

Size: 451 Bytes

Versions: 16

Compression:

Stored size: 451 Bytes

Contents

require 'wework/token/base'

module Wework
  module Token
    class ProviderToken < Base

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

      def token_key
        'provider_access_token'
      end

      def refresh_token
        client.request.post 'service/get_provider_token', {corpid: client.corp_id, provider_secret: client.secret}
      end

    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

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