Class Authorization.AuthorizationImpl
java.lang.Object
io.vertx.mutiny.ext.auth.authorization.Authorization.AuthorizationImpl
- All Implemented Interfaces:
MutinyDelegate,Authorization
- Enclosing interface:
- Authorization
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vertx.mutiny.ext.auth.authorization.Authorization
Authorization.AuthorizationImpl -
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationImpl(io.vertx.ext.auth.authorization.Authorization delegate) Create a new instance ofAuthorization.AuthorizationImpldelegating to the given (non-null) instance ofAuthorization. -
Method Summary
Modifier and TypeMethodDescriptionio.vertx.ext.auth.authorization.AuthorizationGet the delegate instance.booleanmatch(AuthorizationContext context) this methods verifies whether or not the authorization match the specified context.booleanthis methods verifies whether or not the authorization match the specified user.io.vertx.core.json.JsonObjecttoJson()booleanverify(Authorization authorization) this method verifies whether or not the authorization implies the specified authorization.
-
Constructor Details
-
AuthorizationImpl
public AuthorizationImpl(io.vertx.ext.auth.authorization.Authorization delegate) Create a new instance ofAuthorization.AuthorizationImpldelegating to the given (non-null) instance ofAuthorization.
-
-
Method Details
-
getDelegate
public io.vertx.ext.auth.authorization.Authorization getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceAuthorization- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
match
this methods verifies whether or not the authorization match the specified context.- Specified by:
matchin interfaceAuthorization- Parameters:
context- the context.- Returns:
- true if there's a match.
-
match
this methods verifies whether or not the authorization match the specified user. Internally a basic context is created with the user and the method delegates tomatch(AuthorizationContext)- Specified by:
matchin interfaceAuthorization- Parameters:
user- the user.- Returns:
- true if there's a match
-
verify
this method verifies whether or not the authorization implies the specified authorization. Note that it doesn't always mean an exact match. For instance, in the case of aWildcardPermissionBasedAuthorization, this method may return true even if the permissions are different WildcardPermissionBasedAuthorization.create('*').verify(WildcardPermissionBasedAuthorization.create('anypermission')) would return true- Specified by:
verifyin interfaceAuthorization- Parameters:
authorization- the authorization.- Returns:
- true if implies the argument.
-
toJson
public io.vertx.core.json.JsonObject toJson()- Specified by:
toJsonin interfaceAuthorization
-