<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 02.03.18 12:28, Aymeric Moizard
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CALM7LKM_mfzmr_fpR6=nkDx0WsydHH6fuXCbWTPfdtCcMS04JQ@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        Hi list!
        <div><br>
        </div>
        <div>I'm trying to remove Proxy-Authorization dedicated</div>
        <div>to local subscriber without -and not the other ones</div>
        <div>dedicated to other server-</div>
        <div><br>
        </div>
        <div>I realized that "consume_credentials" doesn't work</div>
        <div>because it requires that a call to "www_authorize,</div>
        <div>proxy_authorize, www_authenticate or proxy_authenticate"</div>
        <div>has been made before. I have a use-case where this isn't</div>
        <div>called.</div>
        <div><br>
        </div>
        <div>
          <div>I don't want to use such code:</div>
          <div><br>
          </div>
          <div>
            <pre style="color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">if (is_present_hf("Proxy-Authorization")) {
        remove_hf("Proxy-Authorization");
}
</pre>
            Because this may remove a "Proxy-Authorization"</div>
          <div>for another service.</div>
          <div><br>
          </div>
          <div>I have seen this: has_credentials but it doesn't help</div>
          <div>to know which header is the one containing the header...</div>
          <div><br>
          </div>
          <div>Any good way to find the header and index?</div>
          <div>And then remove it with remove _hf_value2?</div>
          <div><br>
          </div>
        </div>
      </div>
    </blockquote>
    I haven't looked for the options offered by the textopsx module,
    being added by ser devs in the past, but if your case of not doing
    www/proxy_authenticate() or auth_check() is to avoid a database
    query, then do pv_auth_check(...) with a random password and the
    proper relam. Ignore the result, the header is parsed, even if
    authentication fails, and you should be able to use
    consume_credentials().<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - March 5-7, 2018, Berlin - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>