Class BasicAuthArgumentBinder
java.lang.Object
io.micronaut.http.server.binding.BasicAuthArgumentBinder
- All Implemented Interfaces:
ArgumentBinder<BasicAuth, HttpRequest<?>>, TypeArgumentBinder<BasicAuth, HttpRequest<?>>, RequestArgumentBinder<BasicAuth>, TypedRequestArgumentBinder<BasicAuth>
@Singleton
public class BasicAuthArgumentBinder
extends Object
implements TypedRequestArgumentBinder<BasicAuth>
Responsible for binding to a
BasicAuth argument from the authorization
header in the request.- Since:
- 1.3.0
- Author:
- James Kleeh
-
Nested Class Summary
Nested classes/interfaces inherited from interface ArgumentBinder
ArgumentBinder.BindingResult<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind(ArgumentConversionContext<BasicAuth> context, HttpRequest<?> source) Bind the given argument from the given source.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RequestArgumentBinder
createSpecificMethods inherited from interface TypedRequestArgumentBinder
matches, superTypes
-
Constructor Details
-
BasicAuthArgumentBinder
public BasicAuthArgumentBinder()
-
-
Method Details
-
argumentType
- Specified by:
argumentTypein interfaceTypeArgumentBinder<BasicAuth, HttpRequest<?>>- Returns:
- The argument type.
-
bind
public ArgumentBinder.BindingResult<BasicAuth> bind(ArgumentConversionContext<BasicAuth> context, HttpRequest<?> source) Description copied from interface:ArgumentBinderBind the given argument from the given source.- Specified by:
bindin interfaceArgumentBinder<BasicAuth, HttpRequest<?>>- Parameters:
context- TheArgumentConversionContextsource- The source- Returns:
- An
Optionalof the value. If no binding was possibleOptional.empty()
-