title: Use of private and public credentials in JAAS
body: <p>In an interview interviewer asked me why you need private credentials in <code>JAAS</code>?<br>
  We can access both public credentials and private credentials like :</p>
  
  <pre><code>Set&lt;Object&gt; privateCredentials = subject.getPrivateCredentials();
  Set&lt;Object&gt; publicCredentials = subject.getPublicCredentials();
  </code></pre>
  
  <p>Both ( <code>privateCredentials</code> and <code>publicCredentials</code> ) are accessible and the way of access are same. 
  <br>So, what is the significance for tow types of credentials?</p>