title: how to specify open id realm in openid4java 0.9.5
body: <p>my url @ development : <a href="http://192.168.0.1:8888/com.company.MyEntryPoint/MyEntrypoint.html" rel="nofollow noreferrer">http://192.168.0.1:8888/com.company.MyEntryPoint/MyEntrypoint.html</a>
  my url @ live env : <a href="http://www.example.com/com.company.MyEntryPoint/MyEntrypoint.html" rel="nofollow noreferrer">http://www.example.com/com.company.MyEntryPoint/MyEntrypoint.html</a></p>
  
  <p>I need users to authenticate using open id,
  this is how i want my realm to be: 
  *.company.MyEntryPoint</p>
  
  <p>I wrote a simple code to specify realm:</p>
  
  <pre><code>AuthRequest authReq = 
      manager.authenticate(
          discovered,
          returnToUrl,
          "*.company.MyEntryPoint"
      );
  </code></pre>
  
  <p>it does not work.
  Exception:</p>
  
  <pre><code>org.openid4java.message.MessageException: 0x301: Realm verification failed (2) for: *.company.MyEntryPoint
      at org.openid4java.message.AuthRequest.validate(AuthRequest.java:354)
      at org.openid4java.message.AuthRequest.createAuthRequest(AuthRequest.java:101)
      at org.openid4java.consumer.ConsumerManager.authenticate(ConsumerManager.java:1073)
  </code></pre>
  
  <p>Of all the combinations I tried, curiously, the following worked:</p>
  
  <pre><code>AuthRequest authReq = 
      manager.authenticate(
          discovered,
          returnToUrl,
          "http://localhost:8888/com.capgent.MyEntryPoint"
      );
  </code></pre>
  
  <p>This does not solves my issue but rather complicates it :)</p>
  
  <p>According to <a href="http://groups.google.com/group/google-federated-login-api/web/the-most-important-technical-issue-in-using-the-google-accounts-api?pli=1" rel="nofollow noreferrer">google</a> and <a href="http://openid.net/specs/openid-authentication-2_0-12.html#realms" rel="nofollow noreferrer">open id spec</a> it should have worked </p>
  
  <p>complete code snippet:</p>
  
  <pre><code>List discoveries = manager.discover(clientUrl);
  DiscoveryInformation discovered = manager.associate(discoveries);
  AuthRequest authReq = manager.authenticate(discovered, returnToUrl,"*.company.MyEntryPoint");
  FetchRequest fetch = FetchRequest.createFetchRequest();
  fetch.addAttribute("email", "http://schema.openid.net/contact/email", true);
  fetch.addAttribute("country", "http://axschema.org/contact/country/home", true);
  fetch.addAttribute("firstname", "http://axschema.org/namePerson/first", true);
  fetch.addAttribute("lastname", "http://axschema.org/namePerson/last", true);
  fetch.addAttribute("language", "http://axschema.org/pref/language", true);
  authReq.addExtension(fetch);
  String returnStr;
  if (!discovered.isVersion2())
  {
      returnStr = authReq.getDestinationUrl(true);
  }
  else
  {
      returnStr = authReq.getDestinationUrl(false);
  }
  </code></pre>
  
  <p>What am I doing wrong over here ?</p>