public class DigestAuthHandler extends Object implements AuthHandler, Handler<RoutingContext>
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<DigestAuthHandler> |
__TYPE_ARG |
static long |
DEFAULT_NONCE_EXPIRE_TIMEOUT
The default nonce expire timeout to use in milliseconds.
|
Constructor and Description |
---|
DigestAuthHandler(DigestAuthHandler delegate) |
DigestAuthHandler(Object delegate) |
Modifier and Type | Method and Description |
---|---|
AuthHandler |
addAuthorities(Set<String> authorities)
Add a set of required authorities for this auth handler
|
AuthHandler |
addAuthority(String authority)
Add a required authority for this auth handler
|
void |
authorize(User user,
Handler<AsyncResult<Void>> handler)
Authorizes the given user against all added authorities.
|
static DigestAuthHandler |
create(HtdigestAuth authProvider)
Create a digest auth handler
|
static DigestAuthHandler |
create(HtdigestAuth authProvider,
long nonceExpireTimeout)
Create a digest auth handler, specifying the expire timeout for nonces.
|
boolean |
equals(Object o) |
DigestAuthHandler |
getDelegate() |
void |
handle(RoutingContext event)
Something has happened, so handle it.
|
int |
hashCode() |
static DigestAuthHandler |
newInstance(DigestAuthHandler arg) |
void |
parseCredentials(RoutingContext context,
Handler<AsyncResult<JsonObject>> handler)
Parses the credentials from the request into a JsonObject.
|
Completable |
rxAuthorize(User user)
Authorizes the given user against all added authorities.
|
Single<JsonObject> |
rxParseCredentials(RoutingContext context)
Parses the credentials from the request into a JsonObject.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance
public static final io.vertx.lang.rx.TypeArg<DigestAuthHandler> __TYPE_ARG
public static final long DEFAULT_NONCE_EXPIRE_TIMEOUT
public DigestAuthHandler(DigestAuthHandler delegate)
public DigestAuthHandler(Object delegate)
public DigestAuthHandler getDelegate()
getDelegate
in interface AuthHandler
public void handle(RoutingContext event)
handle
in interface Handler<RoutingContext>
handle
in interface AuthHandler
event
- the event to handlepublic AuthHandler addAuthority(String authority)
addAuthority
in interface AuthHandler
authority
- the authoritypublic AuthHandler addAuthorities(Set<String> authorities)
addAuthorities
in interface AuthHandler
authorities
- the set of authoritiespublic void parseCredentials(RoutingContext context, Handler<AsyncResult<JsonObject>> handler)
parseCredentials
in interface AuthHandler
context
- the routing contexthandler
- the handler to be called once the information is available.public Single<JsonObject> rxParseCredentials(RoutingContext context)
context
- the routing contextpublic void authorize(User user, Handler<AsyncResult<Void>> handler)
authorize
in interface AuthHandler
user
- a user.handler
- the handler for the result.public Completable rxAuthorize(User user)
user
- a user.public static DigestAuthHandler create(HtdigestAuth authProvider)
authProvider
- the auth provider to usepublic static DigestAuthHandler create(HtdigestAuth authProvider, long nonceExpireTimeout)
authProvider
- the auth service to usenonceExpireTimeout
- the nonce expire timeout in milliseconds.public static DigestAuthHandler newInstance(DigestAuthHandler arg)
Copyright © 2023 Eclipse. All rights reserved.