protected static ResponseEntity buildUnauthorizedResponseEntity(final String code) {
        val map = OAuth20Utils.getErrorResponseBody(code, HttpStatus.UNAUTHORIZED.getReasonPhrase());
        return new ResponseEntity<>(map, HttpStatus.UNAUTHORIZED);
    }
This controller returns a profile for the authenticated user
(identifier + attributes), found with the access token.

@author Jerome Leleu
@since 3.5.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/endpoints/OAuth20UserProfileEndpointController.java