Package com.tangosol.net
Class URLPasswordProvider
java.lang.Object
com.tangosol.net.InputStreamPasswordProvider
com.tangosol.net.URLPasswordProvider
- All Implemented Interfaces:
PasswordProvider
A
PasswordProvider that reads the contents of a URL to obtain a password.- Since:
- 22.06
- Author:
- Jonathan Knight 2020.01.25
-
Field Summary
Fields inherited from interface com.tangosol.net.PasswordProvider
NullImplementation -
Constructor Summary
ConstructorsConstructorDescriptionURLPasswordProvider(String sURL) Create aURLPasswordProviderthat reads a password from the specified URL.URLPasswordProvider(String sURL, boolean fFirstLineOnly) Create aURLPasswordProviderthat reads a password from the specified URL. -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStreamReturns theInputStreamto read the password from.getURL()Returns the URL to read the password from.Methods inherited from class com.tangosol.net.InputStreamPasswordProvider
get, isFirstLineOnly
-
Constructor Details
-
URLPasswordProvider
Create aURLPasswordProviderthat reads a password from the specified URL.If the
URLreturns no data, anullpassword will be returned.If the
URLis invalid, does not exist, or returns an error when opening theInputStreamPasswordProvider.get()method will throw an exception.- Parameters:
sURL- the URL to read the password from
-
URLPasswordProvider
Create aURLPasswordProviderthat reads a password from the specified URL.If the
URLis invalid, does not exist, or returns an error when opening theInputStreamPasswordProvider.get()method will throw an exception.- Parameters:
sURL- the URL to read the password fromfFirstLineOnly-trueto only treat the first line of the data returned from theURLas the password
-
-
Method Details
-
getURL
Returns the URL to read the password from.- Returns:
- the URL to read the password from
-
getInputStream
Description copied from class:InputStreamPasswordProviderReturns theInputStreamto read the password from.- Specified by:
getInputStreamin classInputStreamPasswordProvider- Returns:
- the
InputStreamto read the password from - Throws:
IOException- if there is an error opening theInputStream
-