Authorization 오류 메시지 출력 변경 - 실제 사용하는 토큰헤더이름사용하도록 변경
This commit is contained in:
@@ -315,13 +315,13 @@ public class ApiAuthFilter implements HttpAdapterFilter {
|
||||
if (StringUtils.isNotBlank(queryToken)) {
|
||||
return queryToken.trim();
|
||||
}
|
||||
throw new JwtAuthException(ERROR_AUTHENTICATION_FAIL, "No have header info: Authorization");
|
||||
throw new JwtAuthException(ERROR_AUTHENTICATION_FAIL, "No have header info: " + tokenHeaderName);
|
||||
}
|
||||
|
||||
String[] components = authorization.trim().split("\\s+", 2);
|
||||
|
||||
if (components.length != 2) {
|
||||
throw new JwtAuthException(ERROR_AUTHENTICATION_FAIL, "Malformat [Authorization] content");
|
||||
throw new JwtAuthException(ERROR_AUTHENTICATION_FAIL, "Malformat [" + tokenHeaderName + "] content");
|
||||
}
|
||||
|
||||
if (!StringUtils.equalsIgnoreCase(components[0], "Bearer")) {
|
||||
|
||||
Reference in New Issue
Block a user