T - The implementing type to be e.g. returned by according builder
methods and Super-Type of V.V - The lest common super-type of T which can be used to validate
credentials.AuthTypeAccessor, org.refcodes.mixin.Validatable<V>BasicAuthCredentials, BasicAuthCredentials.BasicAuthCredentialsBuilder, BearerAuthCredentialsBasicAuthCredentialsBuilderImpl, BasicAuthCredentialsImpl, BearerAuthCredentialsImplpublic interface AuthCredentials<T extends AuthCredentials<T,V>,V extends org.refcodes.mixin.Validatable<V>> extends org.refcodes.mixin.Validatable<V>, AuthTypeAccessor
AuthTypeAccessor.AuthTypeBuilder<B extends AuthTypeAccessor.AuthTypeBuilder<B>>, AuthTypeAccessor.AuthTypeMutator, AuthTypeAccessor.AuthTypeProperty| Modifier and Type | Method | Description |
|---|---|---|
void |
fromHttpAuthorization(String aHttpAuthorization) |
Initializes this
AuthCredentials instance from the
HeaderField.AUTHORIZATION Header-Fields's value. |
String |
toHttpAuthorization() |
Creates a
HeaderField.AUTHORIZATION HTTP Header-Field value from
the AuthCredentials instance. |
void |
validate(V aCredentials) |
Validates the provided
BasicCredentials with this
BasicAuthCredentials via Validatable.isValid(Object). |
T |
withHttpAuthorization(String aHttpAuthorization) |
Initializes this
AuthCredentials instance from the
HeaderField.AUTHORIZATION Header-Fields's value. |
getAuthTypeString toHttpAuthorization()
HeaderField.AUTHORIZATION HTTP Header-Field value from
the AuthCredentials instance.void fromHttpAuthorization(String aHttpAuthorization) throws IllegalArgumentException
AuthCredentials 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.T withHttpAuthorization(String aHttpAuthorization) throws IllegalArgumentException
AuthCredentials 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.void validate(V aCredentials) throws ForbiddenException
BasicCredentials with this
BasicAuthCredentials via Validatable.isValid(Object). In case the
provided BasicCredentials are not valid, then a
ForbiddenException is thrown.aCredentials - The BasicCredentials to be verified.ForbiddenException - thrown in case the provided
BasicCredentials do not match.Copyright © 2018. All rights reserved.