X-Git-Url: https://git-public.kairo.at/?p=authserver.git;a=blobdiff_plain;f=app%2Ftoken.php;h=6013f57ec5c7ff773b8359ef8f27e71cf2dbf2a6;hp=e934b141bf85ec9b59a8af5c2dfcb71e66597145;hb=6b4b266182d3d66729634c7fec7286ef86332dbf;hpb=426f76b2a5fa23ffba2f9ebf70ea8a384e733d23 diff --git a/app/token.php b/app/token.php index e934b14..6013f57 100644 --- a/app/token.php +++ b/app/token.php @@ -8,6 +8,13 @@ // Include the common auth system files (including the OAuth2 Server object). require_once(__DIR__.'/authsystem.inc.php'); +if ($settings['piwik_enabled']) { + // We do not send out an HTML file, so we need to do the Piwik tracking ourselves. + require_once($settings['piwik_tracker_path'].'PiwikTracker.php'); + PiwikTracker::$URL = ((strpos($settings['piwik_url'], '://') === false) ? 'http://localhost' : '' ).$settings['piwik_url']; + $piwikTracker = new PiwikTracker($idSite = $settings['piwik_site_id']); + $piwikTracker->doTrackPageView('Token Request'); +} $errors = $utils->checkForSecureConnection();