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
SimpleNetworkAuthenticatorimplementation for connectors. Instances use a singlePasswordAuthenticationinstance which is not dependent on theNetworkAuthenticatorContextwith one exception. TherequestPasswordAuthentication(NetworkAuthenticatorContext)method only supports theAuthenticator.RequestorType.SERVERrequestor 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 thePasswordAuthenticationinstance that will be used for all authentication requests.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PasswordAuthenticationrequestPasswordAuthentication(NetworkAuthenticatorContext connectorAuthenticatorContext)This method is used to request aPasswordAuthenticationinstance 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 thePasswordAuthenticationinstance 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:NetworkAuthenticatorThis method is used to request aPasswordAuthenticationinstance based on the specified context. Implementations should use the information in the provided context to determine the correct credentials for the request.- Specified by:
requestPasswordAuthenticationin interfaceNetworkAuthenticator- Parameters:
connectorAuthenticatorContext-NetworkAuthenticatorContextwith authentication request details- Returns:
PasswordAuthenticationwith user credentials if authentication is required for the network connection, null otherwise
-
-