mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-22 07:22:15 +01:00
added unauthorized status message
This commit is contained in:
@@ -63,6 +63,10 @@ public class HttpUtil
|
||||
/** Field description */
|
||||
public static final String HEADER_WWW_AUTHENTICATE = "WWW-Authenticate";
|
||||
|
||||
/** Field description */
|
||||
public static final String STATUS_UNAUTHORIZED_MESSAGE =
|
||||
"Authorization Required";
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
/**
|
||||
@@ -80,7 +84,8 @@ public class HttpUtil
|
||||
HEADER_WWW_AUTHENTICATE,
|
||||
"Basic realm=\"".concat(AUTHENTICATION_REALM).concat("\""));
|
||||
response.setHeader(HEADER_CONNECTION, HEADERVALUE_CONNECTION_CLOSE);
|
||||
response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
|
||||
response.sendError(HttpServletResponse.SC_UNAUTHORIZED,
|
||||
STATUS_UNAUTHORIZED_MESSAGE);
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user