Package org.stellar.anchor.filter
Class BaseTokenFilter
- java.lang.Object
-
- org.stellar.anchor.filter.BaseTokenFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
- Direct Known Subclasses:
Sep10TokenFilter
public abstract class BaseTokenFilter extends java.lang.Object implements javax.servlet.Filter
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAPPLICATION_JSON_VALUEstatic java.lang.StringJWT_TOKENstatic java.lang.StringOPTIONS
-
Constructor Summary
Constructors Constructor Description BaseTokenFilter(JwtService jwtService)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddestroy()voiddoFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain)voidinit(javax.servlet.FilterConfig filterConfig)protected abstract booleanisEnabled()protected abstract voidvalidate(JwtToken token)
-
-
-
Field Detail
-
JWT_TOKEN
public static final java.lang.String JWT_TOKEN
- See Also:
- Constant Field Values
-
OPTIONS
public static final java.lang.String OPTIONS
- See Also:
- Constant Field Values
-
APPLICATION_JSON_VALUE
public static final java.lang.String APPLICATION_JSON_VALUE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BaseTokenFilter
public BaseTokenFilter(JwtService jwtService)
-
-
Method Detail
-
init
public void init(javax.servlet.FilterConfig filterConfig)
- Specified by:
initin interfacejavax.servlet.Filter
-
doFilter
public void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain)- Specified by:
doFilterin interfacejavax.servlet.Filter
-
validate
protected abstract void validate(JwtToken token) throws SepValidationException
- Throws:
SepValidationException
-
isEnabled
protected abstract boolean isEnabled()
-
destroy
public void destroy()
- Specified by:
destroyin interfacejavax.servlet.Filter
-
-