bugfix/only-one-partner-per-person #143

Merged
hsh-michaelhoennig merged 5 commits from bugfix/only-one-partner-per-person into master 2025-01-07 09:30:40 +01:00
2 changed files with 12 additions and 6 deletions
Showing only changes of commit 802cc3a622 - Show all commits

View File

@ -13,10 +13,16 @@ if [ "$1" == "--trace" ]; then
}
function doCurl() {
set -x
curl --fail-with-body \
--header "Authorization: $HSADMINNG_CAS_TICKET" \
--header "assumed-roles: $HSADMINNG_CAS_ASSUME" \
"$@"
if [ -z "$HSADMINNG_CAS_ASSUME" ]; then
curl --fail-with-body \
--header "Authorization: $HSADMINNG_CAS_TICKET" \
"$@"
else
curl --fail-with-body \
--header "Authorization: $HSADMINNG_CAS_TICKET" \
--header "assumed-roles: $HSADMINNG_CAS_ASSUME" \
"$@"
fi
set +x
}
shift

View File

@ -45,13 +45,13 @@ public class CasAuthenticator implements Authenticator {
private String casValidation(final HttpServletRequest httpRequest)
throws SAXException, IOException, ParserConfigurationException {
System.err.println("CasAuthenticator.casValidation using CAS-server: " + casServerUrl);
final var ticket = httpRequest.getHeader("Authorization");
final var url = casServerUrl + "/p3/serviceValidate" +
"?service=" + serviceUrl +
"&ticket=" + ticket;
System.err.println("CasAuthenticator.casValidation using URL: " + url);
final var response = restTemplate.getForObject(url, String.class);
final var doc = DocumentBuilderFactory.newInstance().newDocumentBuilder()