Class HttpAuthenticationFeature.BuilderImpl
java.lang.Object
org.glassfish.jersey.client.authentication.HttpAuthenticationFeature.BuilderImpl
- All Implemented Interfaces:
HttpAuthenticationFeature.BasicBuilder,HttpAuthenticationFeature.Builder,HttpAuthenticationFeature.UniversalBuilder
- Enclosing class:
HttpAuthenticationFeature
static class HttpAuthenticationFeature.BuilderImpl
extends Object
implements HttpAuthenticationFeature.UniversalBuilder, HttpAuthenticationFeature.BasicBuilder
Implementation of all authentication builders.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate HttpAuthenticationFeature.Modeprivate byte[]private byte[]private Stringprivate String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the feature.credentials(String username, byte[] password) Set credentials.credentials(String username, String password) Set credentials.credentialsForBasic(String username, byte[] password) Set credentials that will be used for basic authentication only.credentialsForBasic(String username, String password) Set credentials that will be used for basic authentication only.credentialsForDigest(String username, byte[] password) Set credentials that will be used for digest authentication only.credentialsForDigest(String username, String password) Set credentials that will be used for digest authentication only.Configure the builder to create features in non-preemptive basic authentication mode.
-
Field Details
-
usernameBasic
-
passwordBasic
private byte[] passwordBasic -
usernameDigest
-
passwordDigest
private byte[] passwordDigest -
mode
-
-
Constructor Details
-
BuilderImpl
Create a new builder.- Parameters:
mode- Mode in which the final authentication feature should work.
-
-
Method Details
-
credentials
Description copied from interface:HttpAuthenticationFeature.BuilderSet credentials.- Specified by:
credentialsin interfaceHttpAuthenticationFeature.Builder- Parameters:
username- Username.password- Password asString.- Returns:
- This builder.
-
credentials
Description copied from interface:HttpAuthenticationFeature.BuilderSet credentials.- Specified by:
credentialsin interfaceHttpAuthenticationFeature.Builder- Parameters:
username- Username.password- Password as byte array.- Returns:
- This builder.
-
credentialsForBasic
public HttpAuthenticationFeature.UniversalBuilder credentialsForBasic(String username, String password) Description copied from interface:HttpAuthenticationFeature.UniversalBuilderSet credentials that will be used for basic authentication only.- Specified by:
credentialsForBasicin interfaceHttpAuthenticationFeature.UniversalBuilder- Parameters:
username- Username.password- Password asString.- Returns:
- This builder.
-
credentialsForBasic
public HttpAuthenticationFeature.UniversalBuilder credentialsForBasic(String username, byte[] password) Description copied from interface:HttpAuthenticationFeature.UniversalBuilderSet credentials that will be used for basic authentication only.- Specified by:
credentialsForBasicin interfaceHttpAuthenticationFeature.UniversalBuilder- Parameters:
username- Username.password- Password asbyte array.- Returns:
- This builder.
-
credentialsForDigest
public HttpAuthenticationFeature.UniversalBuilder credentialsForDigest(String username, String password) Description copied from interface:HttpAuthenticationFeature.UniversalBuilderSet credentials that will be used for digest authentication only.- Specified by:
credentialsForDigestin interfaceHttpAuthenticationFeature.UniversalBuilder- Parameters:
username- Username.password- Password asString.- Returns:
- This builder.
-
credentialsForDigest
public HttpAuthenticationFeature.UniversalBuilder credentialsForDigest(String username, byte[] password) Description copied from interface:HttpAuthenticationFeature.UniversalBuilderSet credentials that will be used for digest authentication only.- Specified by:
credentialsForDigestin interfaceHttpAuthenticationFeature.UniversalBuilder- Parameters:
username- Username.password- Password asbyte array.- Returns:
- This builder.
-
build
Description copied from interface:HttpAuthenticationFeature.BuilderBuild the feature.- Specified by:
buildin interfaceHttpAuthenticationFeature.Builder- Returns:
- Http authentication feature configured from this builder.
-
nonPreemptive
Description copied from interface:HttpAuthenticationFeature.BasicBuilderConfigure the builder to create features in non-preemptive basic authentication mode.- Specified by:
nonPreemptivein interfaceHttpAuthenticationFeature.BasicBuilder- Returns:
- This builder.
-