Class AndAuthorization
- java.lang.Object
-
- io.vertx.rxjava3.ext.auth.authorization.AndAuthorization
-
- All Implemented Interfaces:
Authorization
public class AndAuthorization extends Object implements Authorization
Allows to perform a logical 'and' between several authorizationsNOTE: This class has been automatically generated from the
original
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<AndAuthorization>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description AndAuthorization(AndAuthorization delegate)
AndAuthorization(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AndAuthorization
addAuthorization(Authorization authorization)
static AndAuthorization
create()
boolean
equals(Object o)
List<Authorization>
getAuthorizations()
AndAuthorization
getDelegate()
int
hashCode()
boolean
match(AuthorizationContext context)
this methods verifies whether or not the authorization match the specified context.boolean
match(User user)
this methods verifies whether or not the authorization match the specified user.static AndAuthorization
newInstance(AndAuthorization arg)
JsonObject
toJson()
String
toString()
boolean
verify(Authorization authorization)
this method verifies whether or not the authorization implies the specified authorization.
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<AndAuthorization> __TYPE_ARG
-
-
Constructor Detail
-
AndAuthorization
public AndAuthorization(AndAuthorization delegate)
-
AndAuthorization
public AndAuthorization(Object delegate)
-
-
Method Detail
-
getDelegate
public AndAuthorization getDelegate()
- Specified by:
getDelegate
in interfaceAuthorization
-
match
public boolean match(AuthorizationContext context)
this methods verifies whether or not the authorization match the specified context.- Specified by:
match
in interfaceAuthorization
- Parameters:
context
- the context.- Returns:
- true if there's a match.
-
verify
public boolean verify(Authorization authorization)
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:
verify
in interfaceAuthorization
- Parameters:
authorization
- the authorization.- Returns:
- true if implies the argument.
-
toJson
public JsonObject toJson()
- Specified by:
toJson
in interfaceAuthorization
-
create
public static AndAuthorization create()
-
getAuthorizations
public List<Authorization> getAuthorizations()
-
addAuthorization
public AndAuthorization addAuthorization(Authorization authorization)
-
match
public boolean match(User user)
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(io.vertx.rxjava3.ext.auth.authorization.AuthorizationContext)
- Parameters:
user
- the user.- Returns:
- true if there's a match
-
newInstance
public static AndAuthorization newInstance(AndAuthorization arg)
-
-