Module: ShotgunApiRuby::Auth::Validator

Defined in:
lib/shotgun_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

Validate auth parameters format

Parameters:

  • []

Returns:

  • (Boolean)


12
13
14
15
16
17
18
19
20
21
22
# File 'lib/shotgun_api_ruby/auth.rb', line 12

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