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.LoginAccessor.LoginBuilder<B extends org.refcodes.mixin.LoginAccessor.LoginBuilder<B>>, org.refcodes.mixin.LoginAccessor.LoginMutator, org.refcodes.mixin.LoginAccessor.LoginProperty
org.refcodes.mixin.UserNameAccessor.UserNameBuilder<B extends org.refcodes.mixin.UserNameAccessor.UserNameBuilder<B>>, org.refcodes.mixin.UserNameAccessor.UserNameMutator, org.refcodes.mixin.UserNameAccessor.UserNameProperty
BASIC_AUTH, DELIMITER_BASIC_AUTH, DELIMITER_CREDENTIALS
Constructor and Description |
---|
BasicAuthCredentialsImpl(String aHttpAuthorization)
Initializes the
BasicAuthCredentials instance from the
HeaderField.AUTHORIZATION header fields's value. |
BasicAuthCredentialsImpl(String aUserName,
String aSecret) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
This implementation of the
equals(Object) method compares the
secret (getSecret() ) case sensitive but the username (
getUserName() ) case insensitive! |
void |
fromHttpAuthorization(String aHttpAuthorization)
Initializes this
BasicAuthCredentials instance from the
HeaderField.AUTHORIZATION header fields's value. |
String |
getSecret() |
String |
getUserName() |
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toHttpAuthorization
public BasicAuthCredentialsImpl(String aHttpAuthorization) throws IllegalArgumentException
BasicAuthCredentials
instance from the
HeaderField.AUTHORIZATION
header fields's value.aHttpAuthorization
- The HeaderField.AUTHORIZATION
header
field's valueIllegalArgumentException
- The value does not conform the the HTTP
Authorization header field's basic authentication format.public String getUserName()
getUserName
in interface org.refcodes.mixin.UserNameAccessor
public String getSecret()
getSecret
in interface org.refcodes.mixin.SecretAccessor
public boolean equals(Object obj)
equals(Object)
method compares the
secret (getSecret()
) case sensitive but the username (
getUserName()
) case insensitive!
public void fromHttpAuthorization(String aHttpAuthorization)
BasicAuthCredentials
BasicAuthCredentials
instance from the
HeaderField.AUTHORIZATION
header fields's value.fromHttpAuthorization
in interface BasicAuthCredentials
aHttpAuthorization
- The HeaderField.AUTHORIZATION
header
field's valueCopyright © 2017. All rights reserved.