java.lang.Object
org.springframework.web.filter.GenericFilterBean
com.erudika.para.server.security.JWTRestfulAuthFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.EnvironmentAware
,org.springframework.core.env.EnvironmentCapable
,org.springframework.web.context.ServletContextAware
public class JWTRestfulAuthFilter
extends org.springframework.web.filter.GenericFilterBean
Security filter that intercepts authentication requests (usually coming from the client-side)
and validates JWT tokens.
- Author:
- Alex Bogdanovski [[email protected]]
-
Field Summary
-
Constructor Summary
ConstructorDescriptionJWTRestfulAuthFilter
(org.springframework.security.authentication.AuthenticationManager authenticationManager) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
doFilter
(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) getter/setter.getter/setter.getter/setter.getter/setter.getter/setter.getter/setter.getter/setter.getter/setter.getter/setter.getter/setter.getter/setter.getter/setter.getter/setter.void
setAmazonAuth
(AmazonAuthFilter amazonAuth) getter/setter.void
setAuthenticationManager
(org.springframework.security.authentication.AuthenticationManager authenticationManager) getter/setter.void
setFacebookAuth
(FacebookAuthFilter facebookAuth) getter/setter.void
setGenericOAuth2Auth
(GenericOAuth2Filter oauthAuth) getter/setter.void
setGithubAuth
(GitHubAuthFilter githubAuth) getter/setter.void
setGoogleAuth
(GoogleAuthFilter googleAuth) getter/setter.void
setLdapAuth
(LdapAuthFilter ldapAuth) getter/setter.void
setLinkedinAuth
(LinkedInAuthFilter linkedinAuth) getter/setter.void
setMicrosoftAuth
(MicrosoftAuthFilter microsoftAuth) getter/setter.void
setPasswordAuth
(PasswordAuthFilter passwordAuth) getter/setter.void
setPasswordlessAuth
(PasswordlessAuthFilter passwordlessAuth) getter/setter.void
setSamlAuth
(SAMLAuthFilter samlAuth) getter/setter.void
setSlackAuth
(SlackAuthFilter slackAuth) getter/setter.void
setTwitterAuth
(TwitterAuthFilter twitterAuth) getter/setter.Methods inherited from class org.springframework.web.filter.GenericFilterBean
destroy, getEnvironment, getFilterConfig, init, setBeanName, setEnvironment, setServletContext
-
Field Details
-
JWT_ACTION
-
-
Constructor Details
-
JWTRestfulAuthFilter
public JWTRestfulAuthFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager) Default constructor.- Parameters:
authenticationManager
- auth manager
-
-
Method Details
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Throws:
IOException
jakarta.servlet.ServletException
-
setAuthenticationManager
public void setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager) getter/setter.- Parameters:
authenticationManager
- auth manager
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classorg.springframework.web.filter.GenericFilterBean
-
getFacebookAuth
-
setFacebookAuth
getter/setter.- Parameters:
facebookAuth
- auth filter
-
getGoogleAuth
-
setGoogleAuth
getter/setter.- Parameters:
googleAuth
- auth filter
-
getGithubAuth
-
setGithubAuth
getter/setter.- Parameters:
githubAuth
- auth filter
-
getLinkedinAuth
-
setLinkedinAuth
getter/setter.- Parameters:
linkedinAuth
- auth filter
-
getTwitterAuth
-
setTwitterAuth
getter/setter.- Parameters:
twitterAuth
- auth filter
-
getMicrosoftAuth
-
setMicrosoftAuth
getter/setter.- Parameters:
microsoftAuth
- auth filter
-
getSlackAuth
-
setSlackAuth
getter/setter.- Parameters:
slackAuth
- auth filter
-
getAmazonAuth
-
setAmazonAuth
getter/setter.- Parameters:
amazonAuth
- auth filter
-
getGenericOAuth2Auth
-
setGenericOAuth2Auth
getter/setter.- Parameters:
oauthAuth
- auth filter
-
getLdapAuth
-
setLdapAuth
getter/setter.- Parameters:
ldapAuth
- auth filter
-
getPasswordAuth
-
setPasswordAuth
getter/setter.- Parameters:
passwordAuth
- auth filter
-
getPasswordlessAuth
-
setPasswordlessAuth
getter/setter.- Parameters:
passwordlessAuth
- auth filter
-
getSamlAuth
-
setSamlAuth
getter/setter.- Parameters:
samlAuth
- auth filter
-