public class BasicAuthCredentialsImpl extends Object implements BasicAuthCredentials
BasicAuthCredentials
interface compares
the secret (getSecret()
) case sensitive but the username (
getUserName()
) case insensitive with the equals(Object)
method.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.UserNameAccessor.UserNameBuilder<B extends org.refcodes.mixin.UserNameAccessor.UserNameBuilder<B>>, org.refcodes.mixin.UserNameAccessor.UserNameMutator, org.refcodes.mixin.UserNameAccessor.UserNameProperty
org.refcodes.mixin.SecretAccessor.SecretBuilder<B extends org.refcodes.mixin.SecretAccessor.SecretBuilder<B>>, org.refcodes.mixin.SecretAccessor.SecretMutator, org.refcodes.mixin.SecretAccessor.SecretProperty
AuthTypeAccessor.AuthTypeBuilder<B extends AuthTypeAccessor.AuthTypeBuilder<B>>, AuthTypeAccessor.AuthTypeMutator, AuthTypeAccessor.AuthTypeProperty
DELIMITER_BASIC_AUTH, DELIMITER_CREDENTIALS
Constructor and Description |
---|
BasicAuthCredentialsImpl()
Instantiates a new basic auth credentials impl.
|
BasicAuthCredentialsImpl(String aUserName,
String aSecret)
Instantiates a new basic auth credentials impl.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
void |
fromHttpAuthorization(String aHttpAuthorization)
Initializes this
AuthCredentials instance from the
HeaderField.AUTHORIZATION Header-Fields's value. |
String |
getSecret() |
String |
getUserName() |
int |
hashCode() |
String |
toHttpAuthorization()
Creates a
HeaderField.AUTHORIZATION HTTP Header-Field value from
the AuthCredentials instance. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAuthType, validate, validate, withHttpAuthorization
isValid, isValid
public BasicAuthCredentialsImpl()
public String getUserName()
getUserName
in interface org.refcodes.mixin.UserNameAccessor
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 © 2017. All rights reserved.