summaryrefslogtreecommitdiffstats
path: root/shib/api.php
diff options
context:
space:
mode:
Diffstat (limited to 'shib/api.php')
-rw-r--r--shib/api.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/shib/api.php b/shib/api.php
index 2098765..4bfee68 100644
--- a/shib/api.php
+++ b/shib/api.php
@@ -36,7 +36,7 @@ if (empty($_SERVER['persistent-id'])) {
. " INNER JOIN organization USING (organizationid) "
. " WHERE user.shibid = :shibid LIMIT 1", array('shibid' => $shibId));
// Figure out role
- if (strpos(";{$_SERVER['entitlement']};", ';http://bwidm.de/entitlement/bwLehrpool;') !== false) {
+ if (strpos(";{$_SERVER['entitlement']};", CONFIG_ENTITLEMENT) !== false) {
$role = 'TUTOR';
} else if (strpos(";{$_SERVER['affiliation']};", ';employee@') !== false
|| strpos(";{$_SERVER['affiliation']};", ';staff@') !== false
@@ -48,11 +48,11 @@ if (empty($_SERVER['persistent-id'])) {
// NEW: Ignore students for now
$response = array(
'status' => 'error',
- 'error' => "Sie wurden als Student eingestuft und können sich daher nicht an der bwLehrpool-Suite anmelden."
+ 'error' => "Sie wurden als Student eingestuft und können sich daher nicht an der " . CONFIG_SUITE . "-Suite anmelden."
. "\nFalls Ihr Nutzerkonto kein Studentenkonto ist stellen Sie sicher, dass Ihr IdP für berechtigte"
- . "\nAccounts entweder das bwLehrpool-Entitlement ausliefert, oder das Attribut 'affiliation'"
+ . "\nAccounts entweder das " . CONFIG_SUITE . "-Entitlement ausliefert, oder das Attribut 'affiliation'"
. "\nausgeliefert wird, und es entweder 'employee@..', 'staff@..' oder 'faculty@..' enthält."
- . "\n\nMehr Informationen finden Sie unter www.bwlehrpool.de"
+ . "\n\nMehr Informationen finden Sie unter " . CONFIG_HELPURL
);
Header('Content-Type: text/plain; charset=utf-8');
die(json_encode($response, JSON_PRETTY_PRINT));
@@ -106,7 +106,7 @@ if (empty($_SERVER['persistent-id'])) {
$response['status'] = 'unregistered';
}
$response['id'] = $shibId;
- $response['url'] = 'https://bwlp-masterserver.ruf.uni-freiburg.de/webif/';
+ $response['url'] = CONFIG_MASTERWEBIF;
@file_put_contents('/tmp/shib-unreg-' . time() . '-' . $_SERVER['REMOTE_ADDR'] . '.txt', print_r($_SERVER, true));
} else {
// Found, see if we got personal information, either temporarily through metadata, or from database