Class: Nexpose::WebCredentials::HTMLForms
- Defined in:
- lib/nexpose/web_credentials.rb
Overview
When using HTML form, this represents the login form information.
Instance Attribute Summary collapse
-
#baseURL ⇒ Object
readonly
Base URL of the application for which the form authentication applies.
-
#enabled ⇒ Object
is this enable for the site configuration.
-
#form ⇒ Object
readonly
The forms to authenticate with.
-
#id ⇒ Object
readonly
id of the header.
-
#loginURL ⇒ Object
readonly
The URL of the login page containing the login form.
-
#name ⇒ Object
readonly
name of the html header.
-
#service ⇒ Object
readonly
service type of header.
-
#soft403Pattern ⇒ Object
readonly
A regular expression used to match against the response to identify authentication failures.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #add_html_form(html_form) ⇒ Object
- #eql?(other) ⇒ Boolean
-
#initialize(name, baseURL, loginURL, soft403Pattern, id = -1,, enabled = true) ⇒ HTMLForms
constructor
A new instance of HTMLForms.
- #to_h ⇒ Object
- #to_json ⇒ Object
Methods inherited from APIObject
Constructor Details
#initialize(name, baseURL, loginURL, soft403Pattern, id = -1,, enabled = true) ⇒ HTMLForms
Returns a new instance of HTMLForms.
204 205 206 207 208 209 210 211 212 |
# File 'lib/nexpose/web_credentials.rb', line 204 def initialize(name, baseURL, loginURL, soft403Pattern, id = -1, enabled = true) @name = name @baseURL = baseURL @loginURL = loginURL @soft403Pattern = soft403Pattern @service = WebAppAuthType::HTML_FORM @enabled = enabled @id = id end |
Instance Attribute Details
#baseURL ⇒ Object (readonly)
Base URL of the application for which the form authentication applies.
190 191 192 |
# File 'lib/nexpose/web_credentials.rb', line 190 def baseURL @baseURL end |
#enabled ⇒ Object
is this enable for the site configuration
196 197 198 |
# File 'lib/nexpose/web_credentials.rb', line 196 def enabled @enabled end |
#form ⇒ Object (readonly)
The forms to authenticate with
202 203 204 |
# File 'lib/nexpose/web_credentials.rb', line 202 def form @form end |
#id ⇒ Object (readonly)
id of the header
200 201 202 |
# File 'lib/nexpose/web_credentials.rb', line 200 def id @id end |
#loginURL ⇒ Object (readonly)
The URL of the login page containing the login form.
192 193 194 |
# File 'lib/nexpose/web_credentials.rb', line 192 def loginURL @loginURL end |
#name ⇒ Object (readonly)
name of the html header
194 195 196 |
# File 'lib/nexpose/web_credentials.rb', line 194 def name @name end |
#service ⇒ Object (readonly)
service type of header
198 199 200 |
# File 'lib/nexpose/web_credentials.rb', line 198 def service @service end |
#soft403Pattern ⇒ Object (readonly)
A regular expression used to match against the response to identify authentication failures.
188 189 190 |
# File 'lib/nexpose/web_credentials.rb', line 188 def soft403Pattern @soft403Pattern end |
Instance Method Details
#==(other) ⇒ Object
234 235 236 |
# File 'lib/nexpose/web_credentials.rb', line 234 def ==(other) eql?(other) end |
#add_html_form(html_form) ⇒ Object
214 215 216 |
# File 'lib/nexpose/web_credentials.rb', line 214 def add_html_form(html_form) @form = html_form end |
#eql?(other) ⇒ Boolean
238 239 240 241 242 243 244 245 246 247 |
# File 'lib/nexpose/web_credentials.rb', line 238 def eql?(other) id.eql?(other.id) && service.eql?(other.service) && enabled.eql?(other.enabled) && name.eql?(other.name) && form.eql?(other.form) && baseURL.eql?(other.baseURL) && loginURL.eql?(other.loginURL) && soft403Pattern.eql?(other.soft403Pattern) end |
#to_h ⇒ Object
222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/nexpose/web_credentials.rb', line 222 def to_h { id: id, service: service, enabled: enabled, name: name, form: form.to_h, baseURL: baseURL, loginURL: loginURL, soft403Pattern: soft403Pattern } end |
#to_json ⇒ Object
218 219 220 |
# File 'lib/nexpose/web_credentials.rb', line 218 def to_json JSON.generate(to_h) end |