hasRole method

bool hasRole(
  1. String role
)

Check if user has role (checks both token and authorization service)

Implementation

bool hasRole(String role) =>
    tokenRoles.contains(role) || authorization.hasRole(role);