Interface Authorization
- All Superinterfaces:
MutinyDelegate
- All Known Implementing Classes:
AndAuthorization,Authorization.AuthorizationImpl,NotAuthorization,OrAuthorization,PermissionBasedAuthorization,RoleBasedAuthorization,WildcardPermissionBasedAuthorization
Interface representing any kind of authorization such as:
- Role based authorization
- Permission based authorization
- Logical authorization (AND, OR, NOT)
- Time based authorization (ie: allow access the last 5 days of the month, from 8am till 10am, etc.)
- Context based authorization (ie: allow access if the ip address is 'xxx.xxx.xxx.xxx')
- Custom based authorization (ie: based on a script or hard-coded code specific to an application)
- etc.
AndAuthorizationNotAuthorizationOrAuthorizationPermissionBasedAuthorizationRoleBasedAuthorizationWildcardPermissionBasedAuthorization
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Stephane Bastian
- See Also:
-
Authorization
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionio.vertx.ext.auth.authorization.Authorizationbooleanmatch(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 AuthorizationnewInstance(io.vertx.ext.auth.authorization.Authorization delegate) Creates a new instance of theAuthorization.io.vertx.core.json.JsonObjecttoJson()booleanverify(Authorization authorization) this method verifies whether or not the authorization implies the specified authorization.
-
Method Details
-
getDelegate
io.vertx.ext.auth.authorization.Authorization getDelegate()- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate used by this Mutiny object of generated type
-
match
this methods verifies whether or not the authorization match the specified context.- 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)- 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- Parameters:
authorization- the authorization.- Returns:
- true if implies the argument.
-
toJson
io.vertx.core.json.JsonObject toJson() -
newInstance
Creates a new instance of theAuthorization.
-