title: Logging into SiteMinder using Java
body: <p>As I am working on the project that is making a call to a url and that url is using siteminder so every time I make a request to that url</p>
  
  <pre><code>https://some-host/a/getmeta?id=10
  </code></pre>
  
  <p>it redirects me to some other url that contains siteminder thing</p>
  
  <pre><code>location: https://login.somehost.com/siteminderagent/nocert/1309460767/smgetcre
  d.scc?TYPE=16777217&amp;REALM=-SM-Documentum%20[12%3a06%3a07%3a4932]&amp;SMAUTHREASON=0&amp;
  METHOD=GET&amp;SMAGENTNAME=-SM-6D9yKpar83ASDc5Sb4KDjZtHgfZId%2fYHFKbzwYvx5EUeGMi0dOa
  uGVx6wOk1daI3&amp;TARGET=-SM-http%3A%2F%2Fsome-host%2Fa%2Fgetmeta%3Fid%3D10
  </code></pre>
  
  <p>And If I open this link into the browser then it ask for the username and password and If I provide the username and password then I get my actual content back..</p>
  
  <p>So how can I authenticate everytime and I am using HTTPCLIENT 4.1.1. </p>