AuthCredentials<BearerAuthCredentials,BearerCredentials>, AuthTypeAccessor, BearerCredentials, org.refcodes.mixin.TokenAccessor, org.refcodes.mixin.Validatable<BearerCredentials>BearerAuthCredentialsImplpublic interface BearerAuthCredentials extends BearerCredentials, AuthCredentials<BearerAuthCredentials,BearerCredentials>
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 BearerAuthCredentials type, call
AuthCredentials.toHttpAuthorization().AuthTypeAccessor.AuthTypeBuilder<B extends AuthTypeAccessor.AuthTypeBuilder<B>>, AuthTypeAccessor.AuthTypeMutator, AuthTypeAccessor.AuthTypeProperty| Modifier and Type | Field | Description |
|---|---|---|
static char |
DELIMITER_BEARER_AUTH |
| 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 aToken) |
Validates the provided user-name and secret with this
BearerAuthCredentials via BearerCredentials.isValid(String). |
default void |
validate(BearerCredentials aCredentials) |
Validates the provided
BearerCredentials with this
BearerAuthCredentials via BearerCredentials.isValid(BearerCredentials). |
default BearerAuthCredentials |
withHttpAuthorization(String aHttpAuthorization) |
Initializes this
AuthCredentials instance from the
HeaderField.AUTHORIZATION Header-Fields's value. |
fromHttpAuthorization, toHttpAuthorizationisValid, isValidstatic final char DELIMITER_BEARER_AUTH
default void validate(BearerCredentials aCredentials) throws ForbiddenException
BearerCredentials with this
BearerAuthCredentials via BearerCredentials.isValid(BearerCredentials). In
case the provided BearerCredentials are not valid, then a
ForbiddenException is thrown.validate in interface AuthCredentials<BearerAuthCredentials,BearerCredentials>aCredentials - The BearerCredentials to be verified.ForbiddenException - thrown in case the provided
BearerCredentials do not match.default void validate(String aToken) throws ForbiddenException
BearerAuthCredentials via BearerCredentials.isValid(String). In case the
provided credentials are not valid, then a ForbiddenException is
thrown.aToken - The secret part to be tested if it fits with the this
BearerCredentials instance.ForbiddenException - thrown in case the provided
BearerCredentials do not match.default BearerAuthCredentials withHttpAuthorization(String aHttpAuthorization) throws IllegalArgumentException
AuthCredentials instance from the
HeaderField.AUTHORIZATION Header-Fields's value.withHttpAuthorization in interface AuthCredentials<BearerAuthCredentials,BearerCredentials>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 AuthTypeAccessorAuthType stored by the Basic-Authentication
credentials property (or null if there are none such
credentials).Copyright © 2018. All rights reserved.