Module: Wework::Api::Methods::Provider

Included in:
Provider
Defined in:
lib/wework/api/methods/provider.rb

Instance Method Summary collapse

Instance Method Details

#get_login_info(auth_code) ⇒ Object



10
11
12
# File 'lib/wework/api/methods/provider.rb', line 10

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

#sso_authorize_url(redirect_uri, user_type = 'admin', state = 'qywxlogin') ⇒ Object



5
6
7
8
# File 'lib/wework/api/methods/provider.rb', line 5

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