protected OAuth20AccessToken generateRegistrationAccessToken(
        final HttpServletRequest request,
        final HttpServletResponse response,
        final OidcRegisteredService registeredService,
        final OidcClientRegistrationRequest registrationRequest) throws Throwable {

        val principal = PrincipalFactoryUtils.newPrincipalFactory().createPrincipal(registeredService.getClientId());
        val authn = DefaultAuthenticationBuilder.newInstance().setPrincipal(principal).build();
        val clientConfigUri = OidcClientRegistrationUtils.getClientConfigurationUri(registeredService,
            getConfigurationContext().getCasProperties().getServer().getPrefix());
        val service = getConfigurationContext().getWebApplicationServiceServiceFactory().createService(clientConfigUri);
        val factory = (OAuth20AccessTokenFactory) getConfigurationContext().getTicketFactory().get(OAuth20AccessToken.class);
        val accessToken = factory.create(service, authn,
            List.of(OidcConstants.CLIENT_CONFIGURATION_SCOPE),
            registeredService.getClientId(),
            OAuth20ResponseTypes.NONE, OAuth20GrantTypes.NONE);
        getConfigurationContext().getTicketRegistry().addTicket(accessToken);
        return accessToken;
    }
Handle request.

@param jsonInput the json input
@param request   the request
@param response  the response
@return the model and view
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/web/controllers/dynareg/OidcDynamicClientRegistrationEndpointController.java