Package io.vertx.mutiny.ext.web.handler
Class DigestAuthHandler
- java.lang.Object
-
- io.vertx.mutiny.ext.web.handler.DigestAuthHandler
-
- All Implemented Interfaces:
io.vertx.core.Handler<RoutingContext>
,AuthenticationHandler
,Consumer<RoutingContext>
public class DigestAuthHandler extends Object implements AuthenticationHandler, io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>
An auth handler that provides HTTP Basic Authentication support. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.smallrye.mutiny.vertx.TypeArg<DigestAuthHandler>
__TYPE_ARG
static long
DEFAULT_NONCE_EXPIRE_TIMEOUT
The default nonce expire timeout to use in milliseconds.
-
Constructor Summary
Constructors Constructor Description DigestAuthHandler(io.vertx.ext.web.handler.DigestAuthHandler delegate)
DigestAuthHandler(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(RoutingContext item)
String
authenticateHeader(RoutingContext context)
static DigestAuthHandler
create(Vertx vertx, HtdigestAuth authProvider)
static DigestAuthHandler
create(Vertx vertx, HtdigestAuth authProvider, long nonceExpireTimeout)
boolean
equals(Object o)
io.vertx.ext.web.handler.DigestAuthHandler
getDelegate()
void
handle(RoutingContext arg0)
int
hashCode()
static DigestAuthHandler
newInstance(io.vertx.ext.web.handler.DigestAuthHandler arg)
io.smallrye.mutiny.Uni<io.vertx.ext.auth.authentication.Credentials>
parseCredentials(RoutingContext context)
Parses the credentials from the request into a JsonObject.io.vertx.ext.auth.authentication.Credentials
parseCredentialsAndAwait(RoutingContext context)
Blocking variant ofAuthenticationHandler.parseCredentials(io.vertx.mutiny.ext.web.RoutingContext)
.void
parseCredentialsAndForget(RoutingContext context)
Variant ofAuthenticationHandler.parseCredentials(io.vertx.mutiny.ext.web.RoutingContext)
that ignores the result of the operation.void
postAuthentication(RoutingContext ctx)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.smallrye.mutiny.vertx.TypeArg<DigestAuthHandler> __TYPE_ARG
-
DEFAULT_NONCE_EXPIRE_TIMEOUT
public static final long DEFAULT_NONCE_EXPIRE_TIMEOUT
The default nonce expire timeout to use in milliseconds.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DigestAuthHandler
public DigestAuthHandler(io.vertx.ext.web.handler.DigestAuthHandler delegate)
-
DigestAuthHandler
public DigestAuthHandler(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.web.handler.DigestAuthHandler getDelegate()
- Specified by:
getDelegate
in interfaceAuthenticationHandler
-
handle
public void handle(RoutingContext arg0)
- Specified by:
handle
in interfaceAuthenticationHandler
- Specified by:
handle
in interfaceio.vertx.core.Handler<RoutingContext>
-
authenticateHeader
public String authenticateHeader(RoutingContext context)
- Specified by:
authenticateHeader
in interfaceAuthenticationHandler
- Parameters:
context
-- Returns:
-
postAuthentication
public void postAuthentication(RoutingContext ctx)
- Specified by:
postAuthentication
in interfaceAuthenticationHandler
- Parameters:
ctx
- the routing context
-
create
public static DigestAuthHandler create(Vertx vertx, HtdigestAuth authProvider)
- Parameters:
vertx
- the vertx instanceauthProvider
- the auth provider to use- Returns:
- the auth handler
-
create
public static DigestAuthHandler create(Vertx vertx, HtdigestAuth authProvider, long nonceExpireTimeout)
- Parameters:
vertx
- the vertx instanceauthProvider
- the auth service to usenonceExpireTimeout
- the nonce expire timeout in milliseconds.- Returns:
- the auth handler
-
parseCredentials
public io.smallrye.mutiny.Uni<io.vertx.ext.auth.authentication.Credentials> parseCredentials(RoutingContext context)
Parses the credentials from the request into a JsonObject. The implementation should be able to extract the required info for the auth provider in the format the provider expects.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Specified by:
parseCredentials
in interfaceAuthenticationHandler
- Parameters:
context
- the routing context- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
parseCredentialsAndAwait
public io.vertx.ext.auth.authentication.Credentials parseCredentialsAndAwait(RoutingContext context)
Blocking variant ofAuthenticationHandler.parseCredentials(io.vertx.mutiny.ext.web.RoutingContext)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Specified by:
parseCredentialsAndAwait
in interfaceAuthenticationHandler
- Parameters:
context
- the routing context- Returns:
- the Credentials instance produced by the operation.
-
parseCredentialsAndForget
public void parseCredentialsAndForget(RoutingContext context)
Variant ofAuthenticationHandler.parseCredentials(io.vertx.mutiny.ext.web.RoutingContext)
that ignores the result of the operation.This method subscribes on the result of
AuthenticationHandler.parseCredentials(io.vertx.mutiny.ext.web.RoutingContext)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromAuthenticationHandler.parseCredentials(io.vertx.mutiny.ext.web.RoutingContext)
but you don't need to compose it with other operations.- Specified by:
parseCredentialsAndForget
in interfaceAuthenticationHandler
- Parameters:
context
- the routing context
-
accept
public void accept(RoutingContext item)
- Specified by:
accept
in interfaceAuthenticationHandler
- Specified by:
accept
in interfaceConsumer<RoutingContext>
-
newInstance
public static DigestAuthHandler newInstance(io.vertx.ext.web.handler.DigestAuthHandler arg)
-
-