-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Non-pressingNot very important atmNot very important atm
Description
So currently in our project we are doing this really redundant thing where we get the JWT from the header, take the UserID from it and replace it then do validation on it.
This is redundant, not needed and can be done with a single middleware function/custom filter.
class JWTParseFilter implements Filter{
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,
FilterChain filterChain) {
// try to get UserId from JWT
// replace UserID in JWT with what ever ID is there
// send it down
// catch any errors
}
}Reactions are currently unavailable
Metadata
Metadata
Labels
Non-pressingNot very important atmNot very important atm