public interface AuthHandler extends Handler<RoutingContext>
An auth handler allows your application to provide authentication/authorization support.
Auth handler requires a SessionHandler
to be on the routing chain before it.
original
non RX-ified interface using Vert.x codegen.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.
|
AuthHandler |
getDelegate() |
void |
handle(RoutingContext event)
Something has happened, so handle it.
|
static AuthHandler |
newInstance(AuthHandler arg) |
void |
parseCredentials(RoutingContext context,
Handler<AsyncResult<JsonObject>> handler)
Parses the credentials from the request into a JsonObject.
|
AuthHandler getDelegate()
void handle(RoutingContext event)
handle
in interface Handler<RoutingContext>
event
- the event to handleAuthHandler addAuthority(String authority)
authority
- the authorityAuthHandler addAuthorities(Set<String> authorities)
authorities
- the set of authoritiesvoid parseCredentials(RoutingContext context, Handler<AsyncResult<JsonObject>> handler)
context
- the routing contexthandler
- the handler to be called once the information is available.void authorize(User user, Handler<AsyncResult<Void>> handler)
user
- a user.handler
- the handler for the result.static AuthHandler newInstance(AuthHandler arg)
Copyright © 2023 Eclipse. All rights reserved.