Skip to content

Commit

Permalink
refactor($Gateway): update exception info
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
Johnny Miller (锺俊) committed Dec 28, 2020
1 parent fed3ea7 commit 036d5e6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public Mono<SecurityContext> load(ServerWebExchange exchange) {
if (StrUtil.isBlank(authorization) || !authorization.startsWith(JwtConfiguration.TOKEN_PREFIX)) {
log.warn("Pre-authentication failure! Cause: `{}` in HTTP headers not found. Request URL: [{}] {}",
HttpHeaders.AUTHORIZATION, request.getMethod(), request.getURI());
return Mono.error(new SecurityException(HttpStatus.FORBIDDEN, "Invalid HTTP headers"));
return Mono.error(new SecurityException(HttpStatus.NETWORK_AUTHENTICATION_REQUIRED, "JWT Required"));
}
val jwt = authorization.replace(JwtConfiguration.TOKEN_PREFIX, "");
String username;
Expand Down

0 comments on commit 036d5e6

Please sign in to comment.