Update AuthenticationFilter.java
This commit is contained in:
@@ -30,7 +30,7 @@ public class AuthenticationFilter extends AbstractAuthenticationProcessingFilter
|
||||
@Override
|
||||
public Authentication attemptAuthentication(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws AuthenticationException, IOException, ServletException {
|
||||
|
||||
Optional<String> tokenParam = Optional.ofNullable(httpServletRequest.getHeader(AUTHORIZATION)); //Authorization: Bearer TOKEN
|
||||
//Optional<String> tokenParam = Optional.ofNullable(httpServletRequest.getHeader(AUTHORIZATION)); //Authorization: Bearer TOKEN
|
||||
String token= StringUtils.isNotEmpty(httpServletRequest.getHeader(AUTHORIZATION))? httpServletRequest.getHeader(AUTHORIZATION) : "";
|
||||
token= StringUtils.removeStart(token, "Bearer").trim();
|
||||
Authentication requestAuthentication = new UsernamePasswordAuthenticationToken(token, token);
|
||||
|
||||
Reference in New Issue
Block a user