3e07b8c99b
Extensive refactoring to move away from directly manipulating datastore options and use local variables instead. The initial template generation method has been redesigned to use an external file via Erubi::Engine which is much cleaner vs. jamming a multiline string into the module. Response HTML from vCenter is now parsed with Nokogiri HTML vs. pulling it out with regex. Registered options have been reworked, following suggestions and feedback. The use of VHOST in particular eliminates the need to pass RHOSTS to the template and makes the module behave more closely to "real" vCenter (i.e., always uses FQDN for the destination). Added advanced datastore options to control the token lifetime NOT_BEFORE and NOT_AFTER skew, in seconds. This also uncovered a bug with the way I was deriving Zulu time which skewed based on the local system time zone offset from Zulu; this has been fixed. Corrected a stupid typo in the validate_fqdn method (don't need to check for capital letters if the test string is always downcase...) validate_idp_options now uses File.binread and can process certs in keys in DER or PEM instead of just PEM. Code optimization, particularly around error handling; other minor tweaks based on improved understanding of the Framework's capabilities. Many style changes and modifications based on suggestions and feedback. Documentation was updated to reflect reality.