def METHOD_NAME(*args, **kwargs):
    """
    'authorize' endpoint for OAuth2 authorization code flow.
    """
    if request.method == 'GET':
        client_id = kwargs.get('client_id')
        redirect_uri = kwargs.get('redirect_uri')
        client = local.model.get_oauth2_client(client_id)
        return template("oauth2_authorize", client=client, redirect_uri=redirect_uri)
    elif request.method == 'POST':
        # Return True back to the authorize_handler wrapper iff confirmed.
        confirm = request.forms.get('confirm', 'no')
        return confirm == 'yes'