This repository has been archived on 2022-07-05. You can view files and clone it, but cannot push or open issues/pull-requests.
steleks_backend/users/src/main/java/ba/steleks/security/CustomUrlUsernamePasswordAu...

17 lines
559 B
Java

package ba.steleks.security;/**
* Created by ensar on 30/05/17.
*/
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
public class CustomUrlUsernamePasswordAuthenticationFilter extends UsernamePasswordAuthenticationFilter {
public CustomUrlUsernamePasswordAuthenticationFilter() {
super();
setRequiresAuthenticationRequestMatcher(
new AntPathRequestMatcher("/accesstoken", "POST")
);
}
}