Skip to content

Commit 38347ef

Browse files
author
Anders Breid
authored
Fix auth to authentication for */logout (#379)
1 parent dd352ac commit 38347ef

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/functionaltests/java/com/ericsson/ei/subscriptions/authentication/AuthenticationSteps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class AuthenticationSteps extends FunctionalTestBase {
6161
@Before("@RESTWithCredentials or @RESTWithSessionCookie")
6262
public void beforeScenario() throws Throwable {
6363
httpRequest = new HttpRequest(HttpMethod.GET);
64-
httpRequest.setHost(hostName).setPort(applicationPort).setEndpoint("/auth/logout");
64+
httpRequest.setHost(hostName).setPort(applicationPort).setEndpoint("/authentication/logout");
6565

6666
String auth = "gauss:password";
6767
String encodedAuth = new String(Base64.encodeBase64(auth.getBytes()), "UTF-8");

src/main/java/com/ericsson/ei/EndpointSecurity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private void addLDAPServersFromList(JSONArray serverList, AuthenticationManagerB
8484

8585
private void configureRequestAuthorization(HttpSecurity http) throws Exception {
8686
http.authorizeRequests()
87-
.antMatchers("/auth/*")
87+
.antMatchers("/authentication/*")
8888
.authenticated()
8989
.antMatchers(HttpMethod.POST, "/subscriptions")
9090
.authenticated()
@@ -105,7 +105,7 @@ private void configureSession(HttpSecurity http) throws Exception {
105105

106106
private void configureLogout(HttpSecurity http) throws Exception {
107107
http.logout()
108-
.logoutUrl("/auth/logout")
108+
.logoutUrl("/authentication/logout")
109109
.logoutSuccessUrl("/")
110110
.deleteCookies("SESSION")
111111
.invalidateHttpSession(true);

0 commit comments

Comments
 (0)