getEffectiveRoles method

Future<List<String>> getEffectiveRoles(
  1. String token,
  2. String resource
)

Get user's effective roles for a resource

Implementation

Future<List<String>> getEffectiveRoles(String token, String resource) async {
  try {
    final authMetadata = await _authValidator.validateToken(token);
    return await _authzProvider.getEffectiveRoles(
      authMetadata.userId,
      resource,
    );
  } on Exception {
    return [];
  }
}