title: AEM 6.4.x + SAML authenticantion (Okta): How do I read (via Java) the SAML response from my SSO provider?
body: <p><strong>TLDR:</strong> Using Java (or other AEM related technology), how do I retrieve the username used to login and subsequently view a protected page?</p>
  
  <hr>
  
  <p>We have protected some pages via login that uses our SSO provider (Oka). I would like to read the SAML response (or at least retrieve the username used to login).</p>
  
  <p>We  want to customize some of the things that's displayed on the protected page.</p>
  
  <p><strong>example:</strong> retrieve and display the logged in user's firstname, lastname, department and other info that are stored in the HR database</p>
  
  <p>How can this be done?</p>
  
  <p>I've looked at cookies (and storage tab in Firefox in general) and cannot find anything there. The only place were I can see the SAML response is when using a browser tool (example: SAML-tracer).</p>
  
  <p>I've searched the net and the results I've found is only about <strong>setting up AEM to connect to a SSO provider</strong> (<strong>this part is already configured and working already</strong>).</p>
  
  <p>Thanks</p>