@Override
    public String getRemotePrincipalId(final HttpServletRequest request) {
        return this.chain
            .stream()
            .map(action -> action.getRemotePrincipalId(request))
            .filter(Objects::nonNull)
            .findFirst()
            .orElse(null);
    }
Add action.

@param action the action
support/cas-server-support-trusted/src/main/java/org/apereo/cas/adaptors/trusted/web/flow/ChainingPrincipalFromRequestNonInteractiveCredentialsAction.java