Skip to content
Snippets Groups Projects
Commit 75e692ae authored by Nicholas Blair's avatar Nicholas Blair
Browse files

Merge branch 'fix-value-annotations' into 'master'

Swap @Value annotation on setters for customLogoutPrefix/Suffix

This pull request fixes the behavior in https://jira.doit.wisc.edu/jira/browse/DNUM-569, where customLogoutPrefix and customLogoutSuffix are swapped, resulting in invalid customLogoutUrls. 

See merge request !2
parents 5eeda6a9 bc3ae689
No related branches found
No related tags found
No related merge requests found
......@@ -221,7 +221,7 @@ public interface PreauthenticatedUserDetailsAttributeMapper {
/**
* @param customLogoutPrefix the customLogoutPrefix to set
*/
@Value("${preauth.customLogoutSuffix:/logout/}")
@Value("${preauth.customLogoutPrefix:/Shibboleth.sso/Logout?return=}")
public void setCustomLogoutPrefix(String customLogoutPrefix) {
this.customLogoutPrefix = customLogoutPrefix;
}
......@@ -234,7 +234,7 @@ public interface PreauthenticatedUserDetailsAttributeMapper {
/**
* @param customLogoutSuffix the customLogoutSuffix to set
*/
@Value("${preauth.customLogoutPrefix:/Shibboleth.sso/Logout?return=}")
@Value("${preauth.customLogoutSuffix:/logout/}")
public void setCustomLogoutSuffix(String customLogoutSuffix) {
this.customLogoutSuffix = customLogoutSuffix;
}
......
......@@ -49,6 +49,7 @@ public class PreauthenticatedUserDetailsAttributeMapperTest {
request.addHeader("mail", email);
request.addHeader("wisceduudds", uddsMembership);
request.addHeader("wisceduisisemplid", emplid);
request.addHeader("Shib-Identity-Provider", "https://logintest.wisc.edu/idp/shibboleth");
UWUserDetails result = filter.mapUser(request);
......@@ -60,6 +61,7 @@ public class PreauthenticatedUserDetailsAttributeMapperTest {
assertEquals(email, result.getEmailAddress());
assertEquals(uddsMembership, result.getUddsMembership());
assertEquals(emplid, result.getIsisEmplid());
assertEquals("/Shibboleth.sso/Logout?return=https://logintest.wisc.edu/logout/", result.getCustomLogoutUrl());
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment