Class PermissionBasedAuthorization
java.lang.Object
io.vertx.rxjava3.ext.auth.authorization.PermissionBasedAuthorization
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate, Authorization
public class PermissionBasedAuthorization
extends Object
implements io.vertx.lang.rx.RxDelegate, Authorization
Represents a permission Note that the permission can optionally be assigned
to a specific resource
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<PermissionBasedAuthorization> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PermissionBasedAuthorizationbooleanreturns the value of the permissionreturns an optional resource that the permission is assigned-oninthashCode()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.static PermissionBasedAuthorizationsetResource(String resource) sets an optional resource that the permission is assigned-ontoJson()toString()booleanverify(Authorization authorization) this method verifies whether or not the authorization implies the specified authorization.
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
PermissionBasedAuthorization
-
PermissionBasedAuthorization
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceAuthorization- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
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.
-
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
- Specified by:
toJsonin interfaceAuthorization
-
create
-
getPermission
-
getResource
returns an optional resource that the permission is assigned-on- Returns:
-
setResource
sets an optional resource that the permission is assigned-on- Parameters:
resource-- Returns:
-
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 toAuthorization.match(AuthorizationContext)- Parameters:
user- the user.- Returns:
- true if there's a match
-
newInstance
-