Skip to content

Instantly share code, notes, and snippets.

@brunokrebs
Created October 23, 2017 12:18
Show Gist options
  • Save brunokrebs/42aa35f360181c66824a64e5cc913fde to your computer and use it in GitHub Desktop.
Save brunokrebs/42aa35f360181c66824a64e5cc913fde to your computer and use it in GitHub Desktop.
package com.auth0.samples.authapi.security;
// imports ...
public class JWTAuthenticationFilter extends UsernamePasswordAuthenticationFilter {
private AuthenticationManager authenticationManager;
public JWTAuthenticationFilter(AuthenticationManager authenticationManager) {
this.authenticationManager = authenticationManager;
setFilterProcessesUrl("/api/login");
}
// everything else remains untouched
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment