@Override
    public void process(final HttpResponse response, final EntityDetails entity, final HttpContext context) {
        Args.notNull(response, "HTTP response");
        Args.notNull(context, "HTTP context");

        final Header header = response.getFirstHeader(AUTHENTICATION_INFO_HEADER);
        if (header != null) {
            final String nextNonce;
            if (header instanceof FormattedHeader) {
                final CharSequence buf = ((FormattedHeader) header).getBuffer();
                final ParserCursor cursor = new ParserCursor(((FormattedHeader) header).getValuePos(), buf.length());
                nextNonce = parseNextNonce(buf, cursor);
            } else {
                final CharSequence headerValue = header.getValue();
                final ParserCursor cursor = new ParserCursor(0, headerValue.length());
                nextNonce = parseNextNonce(headerValue, cursor);
            }
            if (!TextUtils.isBlank(nextNonce)) {
                HttpClientContext.castOrCreate(context).setNextNonce(nextNonce);
            }
        }
    }
Processes the HTTP response and extracts the {@code nextnonce} parameter from the
{@code Authentication-Info} header if available, storing it in the provided {@code context}.

@param response the HTTP response containing the {@code Authentication-Info} header
@param entity   the response entity, ignored by this interceptor
@param context  the HTTP context in which to store the {@code nextnonce} parameter
@throws NullPointerException if either {@code response} or {@code context} is null
httpclient5/src/main/java/org/apache/hc/client5/http/protocol/NextNonceInterceptor.java