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
ConstructorDescriptionURLPasswordProvider
(String sURL) Create aURLPasswordProvider
that reads a password from the specified URL.URLPasswordProvider
(String sURL, boolean fFirstLineOnly) Create aURLPasswordProvider
that reads a password from the specified URL. -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStream
Returns theInputStream
to 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 aURLPasswordProvider
that reads a password from the specified URL.If the
URL
returns no data, anull
password will be returned.If the
URL
is 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 aURLPasswordProvider
that reads a password from the specified URL.If the
URL
is 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
-true
to only treat the first line of the data returned from theURL
as 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:InputStreamPasswordProvider
Returns theInputStream
to read the password from.- Specified by:
getInputStream
in classInputStreamPasswordProvider
- Returns:
- the
InputStream
to read the password from - Throws:
IOException
- if there is an error opening theInputStream
-