File: third_party_personal.rb

package info (click to toggle)
ruby-omniauth-dingtalk-oauth2 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 140 kB
  • sloc: ruby: 177; sh: 4; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 396 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require 'omniauth-dingtalk/client/base'

module OmniAuth
  module Dingtalk
    module Client
      class ThirdPartyPersonal < ::OmniAuth::Dingtalk::Client::Base
        TOKEN_URL = '/sns/gettoken'

        def get_user_info(params = {})
          resp = get_user_info_by_code(params[:code])
          resp['user_info'] || {}
        end
      end
    end
  end
end