Class RoleBasedAuthorization
java.lang.Object
io.vertx.reactivex.ext.auth.authorization.RoleBasedAuthorization
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate, Authorization
public class RoleBasedAuthorization
extends Object
implements io.vertx.lang.rx.RxDelegate, Authorization
Represents a role. Note that this role 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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRoleBasedAuthorization(RoleBasedAuthorization delegate) RoleBasedAuthorization(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionstatic RoleBasedAuthorizationbooleanreturns an optional resource that the role is assigned-ongetRole()returns the roleinthashCode()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 RoleBasedAuthorizationsetResource(String resource) sets an optional resource that the role 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
-
RoleBasedAuthorization
-
RoleBasedAuthorization
-
-
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
-
getRole
-
getResource
-
setResource
sets an optional resource that the role 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
-