def METHOD_NAME(request, realm_authentication_session, user_enrollment_session_pk):
    user_enrollment_session = UserEnrollmentSession.objects.get(
        pk=user_enrollment_session_pk,
        user_enrollment__realm=realm_authentication_session.realm
    )
    user_enrollment_session.set_account_driven_authenticated_status(realm_authentication_session.user)
    scheme = "apple-remotemanagement-user-login"
    if scheme not in HttpResponseRedirect.allowed_schemes:
        HttpResponseRedirect.allowed_schemes.append(scheme)
    return HttpResponseRedirect(
        f"{scheme}://authentication-results?access-token={user_enrollment_session.access_token}",
        status=308
    )