public class ChainAuthHandler extends Object implements AuthHandler, io.vertx.core.Handler<RoutingContext>
original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static TypeArg<ChainAuthHandler> |
__TYPE_ARG |
| Constructor and Description |
|---|
ChainAuthHandler(io.vertx.ext.web.handler.ChainAuthHandler delegate) |
ChainAuthHandler(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
|
ChainAuthHandler |
append(AuthHandler authHandler)
Appends a auth provider to the chain.
|
void |
authorize(User user,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
Authorizes the given user against all added authorities.
|
void |
clear()
Clears the chain.
|
static ChainAuthHandler |
create() |
boolean |
equals(Object o) |
io.vertx.ext.web.handler.ChainAuthHandler |
getDelegate() |
void |
handle(RoutingContext event)
Something has happened, so handle it.
|
int |
hashCode() |
static ChainAuthHandler |
newInstance(io.vertx.ext.web.handler.ChainAuthHandler arg) |
void |
parseCredentials(RoutingContext context,
io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>> handler)
Parses the credentials from the request into a JsonObject.
|
boolean |
remove(AuthHandler authHandler)
Removes a provider from the chain.
|
io.reactivex.Completable |
rxAuthorize(User user)
Authorizes the given user against all added authorities.
|
io.reactivex.Single<io.vertx.core.json.JsonObject> |
rxParseCredentials(RoutingContext context)
Parses the credentials from the request into a JsonObject.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitnewInstancepublic static final TypeArg<ChainAuthHandler> __TYPE_ARG
public ChainAuthHandler(io.vertx.ext.web.handler.ChainAuthHandler delegate)
public ChainAuthHandler(Object delegate)
public io.vertx.ext.web.handler.ChainAuthHandler getDelegate()
getDelegate in interface AuthHandlerpublic void handle(RoutingContext event)
handle in interface io.vertx.core.Handler<RoutingContext>handle in interface AuthHandlerevent - the event to handlepublic AuthHandler addAuthority(String authority)
addAuthority in interface AuthHandlerauthority - the authoritypublic AuthHandler addAuthorities(Set<String> authorities)
addAuthorities in interface AuthHandlerauthorities - the set of authoritiespublic void parseCredentials(RoutingContext context, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>> handler)
parseCredentials in interface AuthHandlercontext - the routing contexthandler - the handler to be called once the information is available.public io.reactivex.Single<io.vertx.core.json.JsonObject> rxParseCredentials(RoutingContext context)
context - the routing contextpublic void authorize(User user, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
authorize in interface AuthHandleruser - a user.handler - the handler for the result.public io.reactivex.Completable rxAuthorize(User user)
user - a user.public static ChainAuthHandler create()
public ChainAuthHandler append(AuthHandler authHandler)
authHandler - auth handlerpublic boolean remove(AuthHandler authHandler)
authHandler - provider to removepublic void clear()
public static ChainAuthHandler newInstance(io.vertx.ext.web.handler.ChainAuthHandler arg)
Copyright © 2022 Eclipse. All rights reserved.