Class AuthorizationHandler
java.lang.Object
io.vertx.reactivex.ext.web.handler.AuthorizationHandler
- All Implemented Interfaces:
Handler<RoutingContext>, io.vertx.lang.rx.RxDelegate
public class AuthorizationHandler
extends Object
implements io.vertx.lang.rx.RxDelegate, Handler<RoutingContext>
Base interface for authorization handlers that provide authorization support.
AuthorizationHandlerImpl usually requires a AuthenticationHandler to be on the routing chain before it
or a custom handler that has previously set a User in the RoutingContext
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationHandler(AuthorizationHandler delegate) AuthorizationHandler(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionaddAuthorizationProvider(AuthorizationProvider authorizationProvider) Adds a provider that shall be used to retrieve the required authorizations for the user to attest.static AuthorizationHandlercreate()create the handler that will check the attribute based authorization.static AuthorizationHandlercreate(Authorization authorization) create the handler that will check the specified authorization Note that to check several authorizations, you can specify a sub-interface such asAndAuthorizationorOrAuthorizationbooleanvoidhandle(RoutingContext event) Something has happened, so handle it.inthashCode()static AuthorizationHandlertoString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
AuthorizationHandler
-
AuthorizationHandler
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
handle
Something has happened, so handle it.- Specified by:
handlein interfaceHandler<RoutingContext>- Parameters:
event- the event to handle
-
create
create the handler that will check the specified authorization Note that to check several authorizations, you can specify a sub-interface such asAndAuthorizationorOrAuthorization- Parameters:
authorization- the authorization to attest.- Returns:
- fluent self.
-
create
create the handler that will check the attribute based authorization. In this mode, the required authorization is computed from the request itself or the metadata of the route. The important keys are:X-ABAC-Domain- The domain of the permission, a domain is a the first segment ofdomain:operationX-ABAC-Operation- The operation of the permission, the operation is a the second segment ofdomain:operationX-ABAC-Resource- This is usually is a opaque string to mark the resource to access
X-ABAC-Domain- AlwayswebX-ABAC-Operation- The request HTTPHttpMethodfromX-ABAC-Resource- The normalized request path from
- Returns:
- fluent self.
-
addAuthorizationProvider
Adds a provider that shall be used to retrieve the required authorizations for the user to attest. Multiple calls are allowed to retrieve authorizations from many sources.- Parameters:
authorizationProvider- a provider.- Returns:
- fluent self.
-
newInstance
-