private static ResponseEntity<OAuth20IntrospectionAccessTokenFailureResponse> buildUnauthorizedResponseEntity(
        final String code, final boolean isAuthenticationFailure) {
        val response = new OAuth20IntrospectionAccessTokenFailureResponse();
        response.setError(code);
        val headers = new LinkedMultiValueMap<String, String>();
        if (isAuthenticationFailure) {
            headers.add(HttpHeaders.WWW_AUTHENTICATE, "Basic");
        }
        return new ResponseEntity<>(response, headers, HttpStatus.UNAUTHORIZED);
    }
This is {@link OAuth20IntrospectionEndpointController}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/endpoints/OAuth20IntrospectionEndpointController.java