lib/jamf/api/connection.rb
# given a token string or a password, get a valid token
# Token.new will raise an exception if the token string or
# credentials are invalid
given a token string or a password, get a valid token
Token.new will raise an exception if the token string or
credentials are invalid
given a token string or a password get a valid token Token . new will raise an exception if the token string or credentials are invalid
def token_from(type, data)
      token_params = {
        user: @user,
        base_url: @base_url,
        timeout: @timeout,
        ssl_options: @ssl_options
      }
      case type
      when :token_string
        token_params[:token_string] = data
      when :pw
        token_params[:pw] = data
      end
      self.class::Token.new token_params
    end
def token_from ( type , data ) token_params = { user : @user , base_url : @base_url , timeout : @timeout , ssl_options : @ssl_options } case type when :token_string token_params [ :token_string ] = data when :pw token_params [ :pw ] = data end self . class :: Token . new token_params end
given a token string or a password, get a valid token
Token.new will raise an exception if the token string or
credentials are invalid
given a token string or a password get a valid token Token . new will raise an exception if the token string or credentials are invalid
type
data