Servlet Filter in keycloak for OIDC

Hy Everyone,

I want to know if we can create a servlet filter for keycloak and deploy it in providers directory so that it can work with keycloak as do for custom extensions.
I want to create a servlet filter for intercepting post request to get request for auth endpoint of keycloak. Please advise if this is possible. If anyone can share any link or GitHub repo for reference that will be plus.