title: How to get JWT token for current Liferay session
body: <p>I have configured Liferay v7.3.4 CE to authenticate with AWS Cognito using OpenID Connect Provider, and that all works fine.</p>
  <p><a href="https://i.stack.imgur.com/0QCY1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0QCY1.png" alt="enter image description here" /></a></p>
  <p>I would now like to invoke REST APIs in AWS, from within Liferay, using the JWT token obtained from Cognito during the sign-in process.</p>
  <p>It would seem this JWT token should be available within Liferay, correct?  If so, a source code example demonstrating how to access this would be very much appreciated.</p>
  <p>This token would then be added to the Authorization header of API calls to an instance of the AWS API Gateway secured by the same Cognito instance from which the user has just signed in.  But first things first... how would someone programmatically access the JWT token for the current Liferay session?</p>
  <p>Hope this makes sense.</p>