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.Mode
private byte[]
private byte[]
private String
private 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.Builder
Set credentials.- Specified by:
credentials
in interfaceHttpAuthenticationFeature.Builder
- Parameters:
username
- Username.password
- Password asString
.- Returns:
- This builder.
-
credentials
Description copied from interface:HttpAuthenticationFeature.Builder
Set credentials.- Specified by:
credentials
in 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.UniversalBuilder
Set credentials that will be used for basic authentication only.- Specified by:
credentialsForBasic
in 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.UniversalBuilder
Set credentials that will be used for basic authentication only.- Specified by:
credentialsForBasic
in 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.UniversalBuilder
Set credentials that will be used for digest authentication only.- Specified by:
credentialsForDigest
in 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.UniversalBuilder
Set credentials that will be used for digest authentication only.- Specified by:
credentialsForDigest
in interfaceHttpAuthenticationFeature.UniversalBuilder
- Parameters:
username
- Username.password
- Password asbyte array
.- Returns:
- This builder.
-
build
Description copied from interface:HttpAuthenticationFeature.Builder
Build the feature.- Specified by:
build
in interfaceHttpAuthenticationFeature.Builder
- Returns:
- Http authentication feature configured from this builder.
-
nonPreemptive
Description copied from interface:HttpAuthenticationFeature.BasicBuilder
Configure the builder to create features in non-preemptive basic authentication mode.- Specified by:
nonPreemptive
in interfaceHttpAuthenticationFeature.BasicBuilder
- Returns:
- This builder.
-