Sha256: 9325357c1ef69d20e67079a8a187bd4685a5c50adb5d5448d2b5240c9540a28d

Contents?: true

Size: 466 Bytes

Versions: 6

Compression:

Stored size: 466 Bytes

Contents

module Wework
  module Api
    module Methods
      module Provider
        def sso_authorize_url(redirect_uri, user_type='admin', state='qywxlogin')
          uri = ERB::Util.url_encode(redirect_uri)
          "#{SSO_AUTHORIZE_ENDPOINT}?appid=#{corp_id}&redirect_uri=#{uri}&state=#{state}&usertype=#{user_type}"
        end

        def get_login_info auth_code
          post 'service/get_login_info', {auth_code: auth_code}
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
wework-1.1.6 lib/wework/api/methods/provider.rb
wework-1.1.5 lib/wework/api/methods/provider.rb
wework-1.1.3 lib/wework/api/methods/provider.rb
wework-1.1.2 lib/wework/api/methods/provider.rb
wework-1.1.1 lib/wework/api/methods/provider.rb
wework-1.1.0 lib/wework/api/methods/provider.rb