/* * style.css - multiAuth.js * Description: * Author: Craig Hamilton * Created: 29 Nov. 2021 * Source: https://github.com/IntersectAustralia/style.css * License: Copyright (c) 2021 Intersect Australia - All Rights Reserved * Unauthorized copying of this file, via any medium is * strictly prohibited. Proprietary and confidential */ function maLogout(btn) { fetch('/auth/login', { method: 'DELETE', headers: { 'Content-Type': 'application/json', 'X-CSRFToken': csrftoken}, body: "session=remove" }) .then( function(response) { if (response.status == 200) { response.text().then(function (url){ var win = btn.ownerDocument.defaultView || btn.ownerDocument.parentWindow; win.location.href = url; }) }} ); };