Constructor that accepts the username and password credentials along with the boolean flag that dictates if multiple retrieval of the password are allowed.
Syntax
UsernamePasswordCallbackHandler
(
String
username
,
char[]
password
,
boolean
allowMultipleAuthentications
)
Parameters
-
username –
Username to use when authenticating
-
password –
Password to use when authenticating
-
allowMultipleAuthentications –
Whether or not multiple authentication attempts are allowed. If this value is false then additional attempts to retrieve the password (after the first one) using the handle method will result in an UnsupportedCallbackException.