Class: Ronin::DB::WebCredential

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Model
Defined in:
lib/ronin/db/web_credential.rb

Overview

Represents Credentials used to access websites at specified URLs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Model

included

Instance Attribute Details

#credentialCredential

Returns:



43
# File 'lib/ronin/db/web_credential.rb', line 43

belongs_to :credential

#idInteger

Primary key of the service credential.

Returns:

  • (Integer)


38
# File 'lib/ronin/db/web_credential.rb', line 38

attribute :id, :integer

#urlURL?

The URL the credential can be used with.

Returns:



49
50
# File 'lib/ronin/db/web_credential.rb', line 49

belongs_to :url, optional:   true,
class_name: 'URL'

Instance Method Details

#to_sString

Converts the web credential to a String.

Returns:

  • (String)

    The user name, clear-text password and the optional URL.



60
61
62
# File 'lib/ronin/db/web_credential.rb', line 60

def to_s
  "#{self.credential} (#{self.url})"
end