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.
202 203 204 205 206 207 208 209 210 |
# File 'lib/nexpose/web_credentials.rb', line 202 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.
188 189 190 |
# File 'lib/nexpose/web_credentials.rb', line 188 def baseURL @baseURL end |
#enabled ⇒ Object
is this enable for the site configuration
194 195 196 |
# File 'lib/nexpose/web_credentials.rb', line 194 def enabled @enabled end |
#form ⇒ Object (readonly)
The forms to authenticate with
200 201 202 |
# File 'lib/nexpose/web_credentials.rb', line 200 def form @form end |
#id ⇒ Object (readonly)
id of the header
198 199 200 |
# File 'lib/nexpose/web_credentials.rb', line 198 def id @id end |
#loginURL ⇒ Object (readonly)
The URL of the login page containing the login form.
190 191 192 |
# File 'lib/nexpose/web_credentials.rb', line 190 def loginURL @loginURL end |
#name ⇒ Object (readonly)
name of the html header
192 193 194 |
# File 'lib/nexpose/web_credentials.rb', line 192 def name @name end |
#service ⇒ Object (readonly)
service type of header
196 197 198 |
# File 'lib/nexpose/web_credentials.rb', line 196 def service @service end |
#soft403Pattern ⇒ Object (readonly)
A regular expression used to match against the response to identify authentication failures.
186 187 188 |
# File 'lib/nexpose/web_credentials.rb', line 186 def soft403Pattern @soft403Pattern end |
Instance Method Details
#==(other) ⇒ Object
231 232 233 |
# File 'lib/nexpose/web_credentials.rb', line 231 def ==(other) eql?(other) end |
#add_html_form(html_form) ⇒ Object
212 213 214 |
# File 'lib/nexpose/web_credentials.rb', line 212 def add_html_form(html_form) @form = html_form end |
#eql?(other) ⇒ Boolean
235 236 237 238 239 240 241 242 243 244 |
# File 'lib/nexpose/web_credentials.rb', line 235 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
220 221 222 223 224 225 226 227 228 229 |
# File 'lib/nexpose/web_credentials.rb', line 220 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
216 217 218 |
# File 'lib/nexpose/web_credentials.rb', line 216 def to_json JSON.generate(to_h) end |