class AuthzHelper {

    public static boolean assumeRoleResourceMatch(String roleName, Assertion assertion) {

        if (!ASSUME_ROLE.equalsIgnoreCase(assertion.getAction())) {
            return false;
        }

        String rezPattern = StringUtils.patternFromGlob(assertion.getResource());
        return roleName.matches(rezPattern);
    }

}