AuthCredentials<BasicAuthCredentials,BasicCredentials>
, AuthTypeAccessor
, BasicCredentials
, org.refcodes.mixin.CredentialsAccessor
, org.refcodes.mixin.IdentityAccessor
, org.refcodes.mixin.SecretAccessor
, org.refcodes.mixin.Validatable<BasicCredentials>
BasicAuthCredentials.BasicAuthCredentialsBuilder
BasicAuthCredentialsBuilderImpl
, BasicAuthCredentialsImpl
public interface BasicAuthCredentials extends BasicCredentials, AuthCredentials<BasicAuthCredentials,BasicCredentials>
AuthCredentials.fromHttpAuthorization(String)
and feed it with the header's
HeaderField.AUTHORIZATION
field's value. To create the according
Header-Field's value from the BasicAuthCredentials
type, call
AuthCredentials.toHttpAuthorization()
.Modifier and Type | Interface | Description |
---|---|---|
static interface |
BasicAuthCredentials.BasicAuthCredentialsBuilder |
Builder type for the
BasicAuthCredentials type. |
AuthTypeAccessor.AuthTypeBuilder<B extends AuthTypeAccessor.AuthTypeBuilder<B>>, AuthTypeAccessor.AuthTypeMutator, AuthTypeAccessor.AuthTypeProperty
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
Modifier and Type | Field | Description |
---|---|---|
static char |
DELIMITER_BASIC_AUTH |
|
static char |
DELIMITER_CREDENTIALS |
Modifier and Type | Method | Description |
---|---|---|
default AuthType |
getAuthType() |
Retrieves the
AuthType from the Authorization-Type property (or
null if there are none such credentials). |
default void |
validate(String aUserName,
String aSecret) |
Validates the provided user-name and secret with this
BasicAuthCredentials via BasicCredentials.isValid(String, String) . |
default void |
validate(BasicCredentials aCredentials) |
Validates the provided
BasicCredentials with this
BasicAuthCredentials via BasicCredentials.isValid(BasicCredentials) . |
default BasicAuthCredentials |
withHttpAuthorization(String aHttpAuthorization) |
Initializes this
AuthCredentials instance from the
HeaderField.AUTHORIZATION Header-Fields's value. |
fromHttpAuthorization, toHttpAuthorization
isValid, isValid
static final char DELIMITER_BASIC_AUTH
static final char DELIMITER_CREDENTIALS
default void validate(BasicCredentials aCredentials) throws ForbiddenException
BasicCredentials
with this
BasicAuthCredentials
via BasicCredentials.isValid(BasicCredentials)
. In
case the provided BasicCredentials
are not valid, then a
ForbiddenException
is thrown.validate
in interface AuthCredentials<BasicAuthCredentials,BasicCredentials>
aCredentials
- The BasicCredentials
to be verified.ForbiddenException
- thrown in case the provided
BasicCredentials
do not match.default void validate(String aUserName, String aSecret) throws ForbiddenException
BasicAuthCredentials
via BasicCredentials.isValid(String, String)
. In
case the provided credentials are not valid, then a
ForbiddenException
is thrown.aUserName
- The user-name part to be tested if it fits with the this
BasicCredentials
instance.aSecret
- The secret part to be tested if it fits with the this
BasicCredentials
instance.ForbiddenException
- thrown in case the provided
BasicCredentials
do not match.default BasicAuthCredentials withHttpAuthorization(String aHttpAuthorization) throws IllegalArgumentException
AuthCredentials
instance from the
HeaderField.AUTHORIZATION
Header-Fields's value.withHttpAuthorization
in interface AuthCredentials<BasicAuthCredentials,BasicCredentials>
aHttpAuthorization
- The HeaderField.AUTHORIZATION
header
field's valueIllegalArgumentException
- The value does not conform the the HTTP
Authorization Header-Field's Basic-Authentication format.default AuthType getAuthType()
AuthType
from the Authorization-Type property (or
null if there are none such credentials).getAuthType
in interface AuthTypeAccessor
AuthType
stored by the Basic-Authentication
credentials property (or null if there are none such
credentials).Copyright © 2018. All rights reserved.