checkRoles method
Batch check multiple roles
Implementation
Future<Map<String, bool>> checkRoles(
String token,
List<String> roles, {
String? resource,
Map<String, dynamic>? context,
}) async {
try {
final authMetadata = await _authValidator.validateToken(token);
return await _authzProvider.checkRoles(
authMetadata.userId,
roles,
resource: resource,
context: context,
);
} on Exception {
return Map.fromEntries(roles.map((role) => MapEntry(role, false)));
}
}