@Nullable
    public static NameID getNameId(Response response, Predicate<NameID> filter) {
        return response.getAssertions().stream()
                       .map(s -> s.getSubject().getNameID())
                       .filter(filter)
                       .findFirst().orElse(null);
    }
Returns a {@link NameID} which is matched to the specified {@code filter} from the {@link Response}.
saml/src/main/java/com/linecorp/armeria/server/saml/SamlUtil.java