hasAnyRole method
Check if token holder has any of the specified roles
Implementation
Future<bool> hasAnyRole(
String token,
List<String> roles, {
String? resource,
Map<String, dynamic>? context,
}) async {
try {
final contextObj = await authorize(
token,
resource: resource,
context: context,
);
return contextObj.hasAnyRole(roles);
} on Exception {
return false;
}
}