Package io.micronaut.http.server.binding
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 io.micronaut.core.bind.ArgumentBinder
ArgumentBinder.BindingResult<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbind
(ArgumentConversionContext<BasicAuth> context, HttpRequest<?> source) Bind the given argument from the given source.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.bind.binders.TypedRequestArgumentBinder
matches, superTypes
-
Constructor Details
-
BasicAuthArgumentBinder
public BasicAuthArgumentBinder()
-
-
Method Details
-
argumentType
- Specified by:
argumentType
in interfaceTypeArgumentBinder<BasicAuth,
HttpRequest<?>> - Returns:
- The argument type.
-
bind
public ArgumentBinder.BindingResult<BasicAuth> bind(ArgumentConversionContext<BasicAuth> context, HttpRequest<?> source) Description copied from interface:ArgumentBinder
Bind the given argument from the given source.- Specified by:
bind
in interfaceArgumentBinder<BasicAuth,
HttpRequest<?>> - Parameters:
context
- TheArgumentConversionContext
source
- The source- Returns:
- An
Optional
of the value. If no binding was possibleOptional.empty()
-