Sha256: 19bbcd1a6b63fbb7b578b948de39c0fafdc2925ee1f327157c6088bb2fbf3224

Contents?: true

Size: 1.45 KB

Versions: 28

Compression:

Stored size: 1.45 KB

Contents

# A publicly disclosed credential, i.e. a {#username}.
class Metasploit::Credential::Public < ApplicationRecord
  include Metasploit::Model::Search

  #
  # Associations
  #

  # @!attribute cores
  #   The {Metasploit::Credential::Core core credentials} that combine this public credential with its derived
  #   {Metasploit::Credential::Private private credential} and/or {Metasploit::Credential::Realm realm}.
  #
  #   @return [ActiveRecord::Relation<Metasploit::Credential::Core>]
  has_many :cores,
           class_name: 'Metasploit::Credential::Core',
           dependent: :destroy,
           inverse_of: :public

  #
  # Attributes
  #

  # @!attribute created_at
  #   When this credential was created.
  #
  #   @return [DateTime]

  # @!attribute updated_at
  #   The last time this credential was updated.
  #
  #   @return [DateTime]

  # @!attribute username
  #   The username for this credential
  #
  #   @return [String]

  #
  #
  # Search
  #
  #

  #
  # Search Attributes
  #

  search_attribute :username,
                   type: :string

  #
  # Search Withs
  #

  search_with Metasploit::Credential::Search::Operator::Type,
              class_names: %w{
                Metasploit::Credential::BlankUsername
                Metasploit::Credential::Username
              }

  #
  # Instance Methods
  #

  # A string suitable for displaying to the user
  #
  # @return [String]
  def to_s
    username.to_s
  end

  Metasploit::Concern.run(self)
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
metasploit-credential-6.0.11 app/models/metasploit/credential/public.rb
metasploit-credential-6.0.10 app/models/metasploit/credential/public.rb
metasploit-credential-6.0.9 app/models/metasploit/credential/public.rb
metasploit-credential-6.0.8 app/models/metasploit/credential/public.rb
metasploit-credential-6.0.7 app/models/metasploit/credential/public.rb
metasploit-credential-6.0.6 app/models/metasploit/credential/public.rb
metasploit-credential-6.0.5 app/models/metasploit/credential/public.rb
metasploit-credential-6.0.4 app/models/metasploit/credential/public.rb
metasploit-credential-6.0.3 app/models/metasploit/credential/public.rb
metasploit-credential-6.0.2 app/models/metasploit/credential/public.rb
metasploit-credential-6.0.1 app/models/metasploit/credential/public.rb
metasploit-credential-6.0.0 app/models/metasploit/credential/public.rb
metasploit-credential-5.0.9 app/models/metasploit/credential/public.rb
metasploit-credential-5.0.8 app/models/metasploit/credential/public.rb
metasploit-credential-5.0.7 app/models/metasploit/credential/public.rb
metasploit-credential-5.0.6 app/models/metasploit/credential/public.rb
metasploit-credential-5.0.5 app/models/metasploit/credential/public.rb
metasploit-credential-5.0.4 app/models/metasploit/credential/public.rb
metasploit-credential-5.0.3 app/models/metasploit/credential/public.rb
metasploit-credential-5.0.2 app/models/metasploit/credential/public.rb