lib/jamf/api/connection.rb
# Raise execeptions if we were given an unusable token object
#
# @param params[Hash] The params for #connect
#
# @return [void]
#
Raise execeptions if we were given an unusable token object
Raise execeptions if we were given an unusable token object
def verify_token(token)
      raise 'Cannot use token: it has expired' if token.expired?
      raise 'Cannot use token: it is invalid' unless token.valid?
      raise "Cannot use token: it expires in less than #{TOKEN_REUSE_MIN_LIFE} seconds" if token.secs_remaining < TOKEN_REUSE_MIN_LIFE
    end
def verify_token ( token ) raise 'Cannot use token: it has expired' if token . expired? raise 'Cannot use token: it is invalid' unless token . valid? raise "Cannot use token: it expires in less than #{TOKEN_REUSE_MIN_LIFE} seconds" if token . secs_remaining < TOKEN_REUSE_MIN_LIFE end
Raise execeptions if we were given an unusable token object
Raise execeptions if we were given an unusable token object
None
void
token
params
The params for #connect
The params for #connect