Package com.boomi.connector.util.network
Class SimpleNetworkAuthenticator
- java.lang.Object
-
- com.boomi.connector.util.network.SimpleNetworkAuthenticator
-
- All Implemented Interfaces:
NetworkAuthenticator
public final class SimpleNetworkAuthenticator extends Object implements NetworkAuthenticator
SimpleNetworkAuthenticator
implementation for connectors. Instances use a singlePasswordAuthentication
instance which is not dependent on theNetworkAuthenticatorContext
with one exception. TherequestPasswordAuthentication(NetworkAuthenticatorContext)
method only supports theAuthenticator.RequestorType.SERVER
requestor type. Requests made torequestPasswordAuthentication(NetworkAuthenticatorContext)
for other requestor types will returnnull
.
-
-
Constructor Summary
Constructors Constructor Description SimpleNetworkAuthenticator(String userName, String password)
Creates a new instance with a user name and password that will be used for all authentication requests.SimpleNetworkAuthenticator(PasswordAuthentication passwordAuthentication)
Creates a new instance with thePasswordAuthentication
instance that will be used for all authentication requests.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PasswordAuthentication
requestPasswordAuthentication(NetworkAuthenticatorContext connectorAuthenticatorContext)
This method is used to request aPasswordAuthentication
instance based on the specified context.
-
-
-
Constructor Detail
-
SimpleNetworkAuthenticator
public SimpleNetworkAuthenticator(String userName, String password)
Creates a new instance with a user name and password that will be used for all authentication requests. The password is required to be non-null
.- Parameters:
userName
- the user namepassword
- the password
-
SimpleNetworkAuthenticator
public SimpleNetworkAuthenticator(PasswordAuthentication passwordAuthentication)
Creates a new instance with thePasswordAuthentication
instance that will be used for all authentication requests.- Parameters:
passwordAuthentication
- the password authentication instance
-
-
Method Detail
-
requestPasswordAuthentication
public PasswordAuthentication requestPasswordAuthentication(NetworkAuthenticatorContext connectorAuthenticatorContext)
Description copied from interface:NetworkAuthenticator
This method is used to request aPasswordAuthentication
instance based on the specified context. Implementations should use the information in the provided context to determine the correct credentials for the request.- Specified by:
requestPasswordAuthentication
in interfaceNetworkAuthenticator
- Parameters:
connectorAuthenticatorContext
-NetworkAuthenticatorContext
with authentication request details- Returns:
PasswordAuthentication
with user credentials if authentication is required for the network connection, null otherwise
-
-