private static Optional<OAuth20AuthorizationRequest.OAuth20AuthorizationRequestBuilder> toAuthorizationRequest(
        final OAuthRegisteredService registeredService,
        final JEEContext context, final Service service,
        final Authentication authentication,
        final OAuth20AuthorizationResponseBuilder builder) {
        return builder.toAuthorizationRequest(context, authentication, service, registeredService);
    }
This controller is in charge of responding to the authorize call in OAuth v2 protocol.
When the request is valid, this endpoint is protected by a CAS authentication.
It returns an OAuth code or directly an 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/OAuth20AuthorizeEndpointController.java