Class FetcherCredentials
java.lang.Object
com.norconex.crawler.fs.fetch.impl.FetcherCredentials
Reads the secrets of fetchers that authenticate with a token, a key or a
client secret, which were plain text configuration properties: the
value can also be given as Credentials, whose password can be
encrypted (and so kept out of the configuration, or supplied as a
variable).
A value set on the property itself always wins, so existing configurations are read as they were.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringid(String configured, Credentials credentials) The identifier that goes with the secret (a client email, a client ID): the configured value if there is one, otherwise the username of the credentials.static Stringsecret(String configured, Credentials credentials) The secret: the configured value if there is one, otherwise the (decrypted) password of the credentials.
-
Method Details
-
secret
The secret: the configured value if there is one, otherwise the (decrypted) password of the credentials.- Parameters:
configured- the value of the plain property, possibly blankcredentials- the credentials, possibly not set- Returns:
- the secret, or the configured value (blank or
null) when there is no other
-
id
The identifier that goes with the secret (a client email, a client ID): the configured value if there is one, otherwise the username of the credentials.- Parameters:
configured- the value of the plain property, possibly blankcredentials- the credentials, possibly not set- Returns:
- the identifier, or the configured value (blank or
null) when there is no other
-