Class URLPasswordProvider

All Implemented Interfaces:
PasswordProvider

public class URLPasswordProvider extends InputStreamPasswordProvider
A PasswordProvider that reads the contents of a URL to obtain a password.
Since:
22.06
Author:
Jonathan Knight 2020.01.25
  • Constructor Details

    • URLPasswordProvider

      public URLPasswordProvider(String sURL)
      Create a URLPasswordProvider that reads a password from the specified URL.

      If the URL returns no data, a null password will be returned.

      If the URL is invalid, does not exist, or returns an error when opening the InputStreamPasswordProvider.get() method will throw an exception.

      Parameters:
      sURL - the URL to read the password from
    • URLPasswordProvider

      public URLPasswordProvider(String sURL, boolean fFirstLineOnly)
      Create a URLPasswordProvider that reads a password from the specified URL.

      If the URL is invalid, does not exist, or returns an error when opening the InputStreamPasswordProvider.get() method will throw an exception.

      Parameters:
      sURL - the URL to read the password from
      fFirstLineOnly - true to only treat the first line of the data returned from the URL as the password
  • Method Details