Sha256: a1f0fcc74159e69174fce00ecde31c48da5fd54cd32a827aff804b740b762210
Contents?: true
Size: 937 Bytes
Versions: 3
Compression:
Stored size: 937 Bytes
Contents
# API key to access the RPC. class Mdm::ApiKey < ActiveRecord::Base # # Attributes # # @!attribute [rw] created_at # When this API Key was created. # # @return [DateTime] # @!attribute [rw] token # The API Key to authenicate to the RPC. # # @return [String] # @!attribute [rw] updated_at # The last time this API Key was updated. # # @return [DateTime] # # # Validations # # # # Method Validations # validate :supports_api # # Attribute Validations # validates :token, :presence => true, :length => { :minimum => 8 } # # Instance Methods # protected # Validates whether License supports API. # # @return [void] # @todo MSP-2724 def supports_api license = License.get if license and not license.supports_api? errors[:license] = " - this product does not support API access" end end Metasploit::Concern.run(self) end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
metasploit_data_models-0.24.4 | app/models/mdm/api_key.rb |
metasploit_data_models-0.24.3 | app/models/mdm/api_key.rb |
metasploit_data_models-0.24.2 | app/models/mdm/api_key.rb |