org.refcodes.mixin.CredentialsAccessor, org.refcodes.mixin.IdentityAccessor, org.refcodes.mixin.SecretAccessor, org.refcodes.mixin.Validatable<BasicCredentials>, AuthCredentials<BasicAuthCredentials,BasicCredentials>, AuthTypeAccessor, BasicAuthCredentials, BasicCredentialsBasicAuthCredentialsBuilderImplpublic class BasicAuthCredentialsImpl extends Object implements BasicAuthCredentials
BasicAuthCredentials interface compares
the secret (getSecret()) case sensitive but the username (
getIdentity()) case insensitive with the equals(Object)
method.AuthTypeAccessor.AuthTypeBuilder<B extends AuthTypeAccessor.AuthTypeBuilder<B>>, AuthTypeAccessor.AuthTypeMutator, AuthTypeAccessor.AuthTypePropertyBasicAuthCredentials.BasicAuthCredentialsBuilderorg.refcodes.mixin.CredentialsAccessor.CredentialsBuilder<B extends org.refcodes.mixin.CredentialsAccessor.CredentialsBuilder<B>>, org.refcodes.mixin.CredentialsAccessor.CredentialsMutator, org.refcodes.mixin.CredentialsAccessor.CredentialsPropertyorg.refcodes.mixin.IdentityAccessor.IdentityBuilder<B extends org.refcodes.mixin.IdentityAccessor.IdentityBuilder<B>>, org.refcodes.mixin.IdentityAccessor.IdentityMutator, org.refcodes.mixin.IdentityAccessor.IdentityPropertyDELIMITER_BASIC_AUTH, DELIMITER_CREDENTIALS| Constructor | Description |
|---|---|
BasicAuthCredentialsImpl() |
Instantiates a new
BasicAuthCredentials instance. |
BasicAuthCredentialsImpl(String aIdentity,
String aSecret) |
Instantiates a new
BasicAuthCredentials instance. |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(Object obj) |
|
void |
fromHttpAuthorization(String aHttpAuthorization) |
Initializes this
AuthCredentials instance from the
HeaderField.AUTHORIZATION Header-Fields's value. |
String |
getIdentity() |
|
String |
getSecret() |
|
int |
hashCode() |
|
String |
toHttpAuthorization() |
Creates a
HeaderField.AUTHORIZATION HTTP Header-Field value from
the AuthCredentials instance. |
String |
toString() |
getAuthType, validate, validate, withHttpAuthorizationisValid, isValidpublic BasicAuthCredentialsImpl()
BasicAuthCredentials instance.public BasicAuthCredentialsImpl(String aIdentity, String aSecret)
BasicAuthCredentials instance.aIdentity - the user nameaSecret - the secretpublic String getIdentity()
getIdentity in interface org.refcodes.mixin.IdentityAccessorpublic String getSecret()
getSecret in interface org.refcodes.mixin.SecretAccessorpublic void fromHttpAuthorization(String aHttpAuthorization)
AuthCredentials instance from the
HeaderField.AUTHORIZATION Header-Fields's value.fromHttpAuthorization in interface AuthCredentials<BasicAuthCredentials,BasicCredentials>aHttpAuthorization - The HeaderField.AUTHORIZATION header
field's valuepublic String toHttpAuthorization()
HeaderField.AUTHORIZATION HTTP Header-Field value from
the AuthCredentials instance.toHttpAuthorization in interface AuthCredentials<BasicAuthCredentials,BasicCredentials>Copyright © 2018. All rights reserved.