Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
All notable changes to this project will be documented in this file.

## [Unreleased]
#### Added
- Added possibility to show statistics only after authentication

#### Changed
- Remove unnecessary is_null()
- Use SimpleSAML\Database
Expand Down
6 changes: 6 additions & 0 deletions config-templates/module_statisticsproxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,10 @@
* Fill the table name for serviceProviders
*/
'serviceProvidersMapTableName' => 'serviceProvidersMap',

/**
* Authentication source name if authentication should be required.
* Defaults to empty string.
*/
//'requireAuth.source' => 'default-sp',
];
7 changes: 7 additions & 0 deletions www/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
$session = Session::getSessionFromRequest();

$configStatisticsproxy = Configuration::getConfig(CONFIG_FILE_NAME_STATISTICSPROXY);

$authSource = $configStatisticsproxy->getString('requireAuth.source', '');
if ($authSource) {
$as = new \SimpleSAML\Auth\Simple($authSource);
$as->requireAuth();
}

$mode = $configStatisticsproxy->getString(MODE, 'PROXY');

$t = new Template($config, 'proxystatistics:statistics-tpl.php');
Expand Down