private void logProtocolRequest(final AccessTokenRequestContext tokenRequestContext) {
        var authn = tokenRequestContext.getAuthentication();
        if (authn == null && tokenRequestContext.getTicketGrantingTicket() instanceof final AuthenticationAwareTicket aat) {
            authn = aat.getAuthentication();
        }
        Objects.requireNonNull(authn, "No authentication is available to handle this request");
        val protocolContext = Map.of(
            "Token", Optional.ofNullable(tokenRequestContext.getToken()).map(OAuth20Token::getId).orElse("none"),
            "Device Code", StringUtils.defaultString(tokenRequestContext.getDeviceCode()),
            "Scopes", String.join(",", tokenRequestContext.getScopes()),
            "Registered Service", tokenRequestContext.getRegisteredService().getName(),
            "Service", tokenRequestContext.getService().getId(),
            "Principal", authn.getPrincipal().getId(),
            "Grant Type", tokenRequestContext.getGrantType().getType(),
            "Response Type", tokenRequestContext.getResponseType().getType());
        LoggingUtils.protocolMessage("OAuth/OpenID Connect Token Request", protocolContext);
        configurationContext.getApplicationContext().publishEvent(
            new OAuth20AccessTokenRequestEvent(this, ClientInfoHolder.getClientInfo(), protocolContext));
    }
Handle request internal model and view.

@param request  the request
@param response the response
@return the model and view
@throws Exception the exception
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/endpoints/OAuth20AccessTokenEndpointController.java