static class HttpAuthenticationFeature.BuilderImpl extends java.lang.Object implements HttpAuthenticationFeature.UniversalBuilder, HttpAuthenticationFeature.BasicBuilder
Modifier and Type | Field and Description |
---|---|
private HttpAuthenticationFeature.Mode |
mode |
private byte[] |
passwordBasic |
private byte[] |
passwordDigest |
private java.lang.String |
usernameBasic |
private java.lang.String |
usernameDigest |
Constructor and Description |
---|
BuilderImpl(HttpAuthenticationFeature.Mode mode)
Create a new builder.
|
Modifier and Type | Method and Description |
---|---|
HttpAuthenticationFeature |
build()
Build the feature.
|
HttpAuthenticationFeature.Builder |
credentials(java.lang.String username,
byte[] password)
Set credentials.
|
HttpAuthenticationFeature.Builder |
credentials(java.lang.String username,
java.lang.String password)
Set credentials.
|
HttpAuthenticationFeature.UniversalBuilder |
credentialsForBasic(java.lang.String username,
byte[] password)
Set credentials that will be used for basic authentication only.
|
HttpAuthenticationFeature.UniversalBuilder |
credentialsForBasic(java.lang.String username,
java.lang.String password)
Set credentials that will be used for basic authentication only.
|
HttpAuthenticationFeature.UniversalBuilder |
credentialsForDigest(java.lang.String username,
byte[] password)
Set credentials that will be used for digest authentication only.
|
HttpAuthenticationFeature.UniversalBuilder |
credentialsForDigest(java.lang.String username,
java.lang.String password)
Set credentials that will be used for digest authentication only.
|
HttpAuthenticationFeature.BasicBuilder |
nonPreemptive()
Configure the builder to create features in non-preemptive basic authentication mode.
|
private java.lang.String usernameBasic
private byte[] passwordBasic
private java.lang.String usernameDigest
private byte[] passwordDigest
private HttpAuthenticationFeature.Mode mode
public BuilderImpl(HttpAuthenticationFeature.Mode mode)
mode
- Mode in which the final authentication feature should work.public HttpAuthenticationFeature.Builder credentials(java.lang.String username, java.lang.String password)
HttpAuthenticationFeature.Builder
credentials
in interface HttpAuthenticationFeature.Builder
username
- Username.password
- Password as String
.public HttpAuthenticationFeature.Builder credentials(java.lang.String username, byte[] password)
HttpAuthenticationFeature.Builder
credentials
in interface HttpAuthenticationFeature.Builder
username
- Username.password
- Password as byte array.public HttpAuthenticationFeature.UniversalBuilder credentialsForBasic(java.lang.String username, java.lang.String password)
HttpAuthenticationFeature.UniversalBuilder
credentialsForBasic
in interface HttpAuthenticationFeature.UniversalBuilder
username
- Username.password
- Password as String
.public HttpAuthenticationFeature.UniversalBuilder credentialsForBasic(java.lang.String username, byte[] password)
HttpAuthenticationFeature.UniversalBuilder
credentialsForBasic
in interface HttpAuthenticationFeature.UniversalBuilder
username
- Username.password
- Password as byte array
.public HttpAuthenticationFeature.UniversalBuilder credentialsForDigest(java.lang.String username, java.lang.String password)
HttpAuthenticationFeature.UniversalBuilder
credentialsForDigest
in interface HttpAuthenticationFeature.UniversalBuilder
username
- Username.password
- Password as String
.public HttpAuthenticationFeature.UniversalBuilder credentialsForDigest(java.lang.String username, byte[] password)
HttpAuthenticationFeature.UniversalBuilder
credentialsForDigest
in interface HttpAuthenticationFeature.UniversalBuilder
username
- Username.password
- Password as byte array
.public HttpAuthenticationFeature build()
HttpAuthenticationFeature.Builder
build
in interface HttpAuthenticationFeature.Builder
public HttpAuthenticationFeature.BasicBuilder nonPreemptive()
HttpAuthenticationFeature.BasicBuilder
nonPreemptive
in interface HttpAuthenticationFeature.BasicBuilder