Package org.projectnessie.client.auth
Class BasicAuthenticationProvider
- java.lang.Object
-
- org.projectnessie.client.auth.BasicAuthenticationProvider
-
- All Implemented Interfaces:
NessieAuthenticationProvider
public class BasicAuthenticationProvider extends java.lang.Object implements NessieAuthenticationProvider
HTTP BASIC authentication provider.Takes parameters
NessieConfigConstants.CONF_NESSIE_USERNAMEandNessieConfigConstants.CONF_NESSIE_PASSWORD.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAUTH_TYPE_VALUE
-
Constructor Summary
Constructors Constructor Description BasicAuthenticationProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpAuthenticationbuild(java.util.function.Function<java.lang.String,java.lang.String> configSupplier)Build the implementation that provides authentication credentials using the given parameters.static HttpAuthenticationcreate(java.lang.String username, java.lang.String password)java.lang.StringgetAuthTypeValue()The authentication type discriminator.
-
-
-
Field Detail
-
AUTH_TYPE_VALUE
public static final java.lang.String AUTH_TYPE_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static HttpAuthentication create(java.lang.String username, java.lang.String password)
-
getAuthTypeValue
public java.lang.String getAuthTypeValue()
Description copied from interface:NessieAuthenticationProviderThe authentication type discriminator. If authentication is configured via properties, likeNessieClientBuilder.fromConfig(Function)/NessieClientBuilder.withAuthenticationFromConfig(Function), set the aNessieAuthenticationProviderinstance is used, ifNessieConfigConstants.CONF_NESSIE_AUTH_TYPEequals the value returned by this method.- Specified by:
getAuthTypeValuein interfaceNessieAuthenticationProvider
-
build
public HttpAuthentication build(java.util.function.Function<java.lang.String,java.lang.String> configSupplier)
Description copied from interface:NessieAuthenticationProviderBuild the implementation that provides authentication credentials using the given parameters.The implementation must throw appropriate exceptions, like
NullPointerExceptionorIllegalArgumentExceptionwith proper and readable explanations, if mandatory configuration options are missing or have wrong/incompatible/invalid values.- Specified by:
buildin interfaceNessieAuthenticationProvider
-
-