Closed
Description
At the moment in a Spring scenario, if you inject the Principal and use Cognito auth, you get the cognito sub (Subject). If you need the username, you must either do a lookup request to Cognito, or fish the ApiGatewayRequestContext and grab it via .getAuthorizer().getClaims().getUsername()
It would be nice if the field that is mapped to the Principal name can be configurable so that one can point it to the username instead of the sub.