java.lang.Object
org.refcodes.web.BasicAuthRequest
- All Implemented Interfaces:
org.refcodes.mixin.Dumpable
,BasicAuthCredentialsAccessor
,HttpMethodAccessor
,UrlAccessor
public class BasicAuthRequest
extends Object
implements BasicAuthCredentialsAccessor, HttpMethodAccessor, UrlAccessor, org.refcodes.mixin.Dumpable
Defines a
BasicAuthRequest
describes a Baisc-Auth request as of HTTP.
See also "https://en.wikipedia.org/wiki/Basic_access_authentication".-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.web.BasicAuthCredentialsAccessor
BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<B extends BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<B>>, BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator, BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty
Nested classes/interfaces inherited from interface org.refcodes.web.HttpMethodAccessor
HttpMethodAccessor.HttpMethodBuilder<B extends HttpMethodAccessor.HttpMethodBuilder<B>>, HttpMethodAccessor.HttpMethodMutator, HttpMethodAccessor.HttpMethodProperty
Nested classes/interfaces inherited from interface org.refcodes.web.UrlAccessor
UrlAccessor.UrlBuilder, UrlAccessor.UrlMutator, UrlAccessor.UrlProperty
-
Constructor Summary
ConstructorDescriptionBasicAuthRequest
(HttpMethod aHttpMethod, Url aUrl, BasicAuthCredentials aCredentials) Constructs aBasicAuthRequest
instance with required attributes. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves theBasicAuthCredentials
from the Basic-Authentication credentials property (or null if there are none such credentials).Retrieves the HTTP-Method from the HTTP-Method property.getUrl()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.refcodes.mixin.Dumpable
toDump, toDump
-
Constructor Details
-
BasicAuthRequest
Constructs aBasicAuthRequest
instance with required attributes.- Parameters:
aHttpMethod
- TheHttpMethod
with which the request has been sent.aUrl
- TheUrl
from which to take the URL specific data.aCredentials
- The credentials retrieved from the request.
-
-
Method Details
-
getBasicAuthCredentials
Retrieves theBasicAuthCredentials
from the Basic-Authentication credentials property (or null if there are none such credentials).- Specified by:
getBasicAuthCredentials
in interfaceBasicAuthCredentialsAccessor
- Returns:
- The
BasicAuthCredentials
stored by the basic authentication credentials property (or null if there are none such credentials).
-
getHttpMethod
Retrieves the HTTP-Method from the HTTP-Method property.- Specified by:
getHttpMethod
in interfaceHttpMethodAccessor
- Returns:
- The HTTP-Method stored by the HTTP-Method property.
-
getUrl
- Specified by:
getUrl
in interfaceUrlAccessor
- Returns:
- The Url stored by the
Url
property.
-