org.refcodes.mixin.CredentialsAccessor
, org.refcodes.mixin.IdentityAccessor
, org.refcodes.mixin.SecretAccessor
, org.refcodes.mixin.Validatable<BasicCredentials>
, AuthCredentials<BasicAuthCredentials,BasicCredentials>
, AuthTypeAccessor
, BasicAuthCredentials
, BasicCredentials
BasicAuthCredentialsBuilderImpl
public 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.AuthTypeProperty
BasicAuthCredentials.BasicAuthCredentialsBuilder
org.refcodes.mixin.CredentialsAccessor.CredentialsBuilder<B extends org.refcodes.mixin.CredentialsAccessor.CredentialsBuilder<B>>, org.refcodes.mixin.CredentialsAccessor.CredentialsMutator, org.refcodes.mixin.CredentialsAccessor.CredentialsProperty
org.refcodes.mixin.IdentityAccessor.IdentityBuilder<B extends org.refcodes.mixin.IdentityAccessor.IdentityBuilder<B>>, org.refcodes.mixin.IdentityAccessor.IdentityMutator, org.refcodes.mixin.IdentityAccessor.IdentityProperty
DELIMITER_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, withHttpAuthorization
isValid, isValid
public 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.IdentityAccessor
public String getSecret()
getSecret
in interface org.refcodes.mixin.SecretAccessor
public 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.