File: client.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 (19 lines) | stat: -rw-r--r-- 464 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require 'omniauth-dingtalk/client/third_party_personal'
require 'omniauth-dingtalk/client/enterprise_internal'

module OmniAuth
  module Dingtalk
    module Client
      def self.get(client_type)
        case client_type.to_s
        when 'third_party_personal'
          ::OmniAuth::Dingtalk::Client::ThirdPartyPersonal
        else
          ::OmniAuth::Dingtalk::Client::EnterpriseInternal
        end
      end
    end
  end
end