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 java.lang.Object implements HttpAuthenticationFeature.UniversalBuilder, HttpAuthenticationFeature.BasicBuilder
Implementation of all authentication builders.
-
-
Field Summary
Fields Modifier and Type Field Description private HttpAuthenticationFeature.Modemodeprivate byte[]passwordBasicprivate byte[]passwordDigestprivate java.lang.StringusernameBasicprivate java.lang.StringusernameDigest
-
Constructor Summary
Constructors Constructor Description BuilderImpl(HttpAuthenticationFeature.Mode mode)Create a new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpAuthenticationFeaturebuild()Build the feature.HttpAuthenticationFeature.Buildercredentials(java.lang.String username, byte[] password)Set credentials.HttpAuthenticationFeature.Buildercredentials(java.lang.String username, java.lang.String password)Set credentials.HttpAuthenticationFeature.UniversalBuildercredentialsForBasic(java.lang.String username, byte[] password)Set credentials that will be used for basic authentication only.HttpAuthenticationFeature.UniversalBuildercredentialsForBasic(java.lang.String username, java.lang.String password)Set credentials that will be used for basic authentication only.HttpAuthenticationFeature.UniversalBuildercredentialsForDigest(java.lang.String username, byte[] password)Set credentials that will be used for digest authentication only.HttpAuthenticationFeature.UniversalBuildercredentialsForDigest(java.lang.String username, java.lang.String password)Set credentials that will be used for digest authentication only.HttpAuthenticationFeature.BasicBuildernonPreemptive()Configure the builder to create features in non-preemptive basic authentication mode.
-
-
-
Field Detail
-
usernameBasic
private java.lang.String usernameBasic
-
passwordBasic
private byte[] passwordBasic
-
usernameDigest
private java.lang.String usernameDigest
-
passwordDigest
private byte[] passwordDigest
-
mode
private HttpAuthenticationFeature.Mode mode
-
-
Constructor Detail
-
BuilderImpl
public BuilderImpl(HttpAuthenticationFeature.Mode mode)
Create a new builder.- Parameters:
mode- Mode in which the final authentication feature should work.
-
-
Method Detail
-
credentials
public HttpAuthenticationFeature.Builder credentials(java.lang.String username, java.lang.String password)
Description copied from interface:HttpAuthenticationFeature.BuilderSet credentials.- Specified by:
credentialsin interfaceHttpAuthenticationFeature.Builder- Parameters:
username- Username.password- Password asString.- Returns:
- This builder.
-
credentials
public HttpAuthenticationFeature.Builder credentials(java.lang.String username, byte[] password)
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(java.lang.String username, java.lang.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(java.lang.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(java.lang.String username, java.lang.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(java.lang.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
public HttpAuthenticationFeature build()
Description copied from interface:HttpAuthenticationFeature.BuilderBuild the feature.- Specified by:
buildin interfaceHttpAuthenticationFeature.Builder- Returns:
- Http authentication feature configured from this builder.
-
nonPreemptive
public HttpAuthenticationFeature.BasicBuilder 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.
-
-