Module: ShotgridApiRuby::Auth::Validator

Extended by:
T::Sig
Defined in:
lib/shotgrid_api_ruby/auth.rb

Overview

Validate auth parameters format

Class Method Summary collapse

Class Method Details

.valid?(client_id: nil, client_secret: nil, username: nil, password: nil, session_token: nil, refresh_token: nil) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/shotgrid_api_ruby/auth.rb', line 26

def self.valid?(
  client_id: nil,
  client_secret: nil,
  username: nil,
  password: nil,
  session_token: nil,
  refresh_token: nil
)
  !!(
    (client_id && client_secret) || (password && username) ||
      session_token || refresh_token
  )
end