This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git

commit bdab0b7a5582361d819ec80579ae6961a62a39f8
Author: Duncan Grant <[email protected]>
AuthorDate: Thu Jun 3 15:30:25 2021 +0100

    Get rid of hard coded test values
---
 .../brooklyn/rest/filter/BrooklynSecurityProviderFilterJersey.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/filter/BrooklynSecurityProviderFilterJersey.java
 
b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/filter/BrooklynSecurityProviderFilterJersey.java
index af9830c..73c964e 100644
--- 
a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/filter/BrooklynSecurityProviderFilterJersey.java
+++ 
b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/filter/BrooklynSecurityProviderFilterJersey.java
@@ -44,6 +44,7 @@ import org.slf4j.LoggerFactory;
 public class BrooklynSecurityProviderFilterJersey implements 
ContainerRequestFilter {
 
     private static final Logger log = 
LoggerFactory.getLogger(BrooklynSecurityProviderFilterJersey.class);
+    public static final String LOGIN_PAGE_HEADER = "LOGIN_PAGE";
 
     @Context
     HttpServletRequest webRequest;
@@ -75,7 +76,7 @@ public class BrooklynSecurityProviderFilterJersey implements 
ContainerRequestFil
             }
             if (rin.getStatus()==Status.UNAUTHORIZED.getStatusCode() &&
                     
Strings.isNonBlank(mgmt.getConfig().getConfig(BrooklynSecurityProviderFilterJavax.LOGIN_FORM)))
 {
-                rin = 
Response.status(Status.UNAUTHORIZED).entity("Authentication is 
required").header("LOGIN_PAGE", "brooklyn-ui-login").build();
+                rin = 
Response.status(Status.UNAUTHORIZED).entity("Authentication is 
required").header(LOGIN_PAGE_HEADER, 
mgmt.getConfig().getConfig(BrooklynSecurityProviderFilterJavax.LOGIN_FORM)).build();
             }
 
             requestContext.abortWith(rin);

Reply via email to