public class AjaxSiteSessionSecurityFilter extends AjaxSecurityFilter
AjaxSecurityFilter
for our framework & security strategies aligned with the "site" module.Modifier and Type | Class and Description |
---|---|
class |
AjaxSiteSessionSecurityFilter.KeyAsSessionIdTransformer
Check request for query param
authKeyParamName .By default will compare to a valid session id. BY DEFAULT THIS LOOPS THROUGH ALL SESSIONS SO NOT IDEAL FOR PRODUCTION. |
Constructor and Description |
---|
AjaxSiteSessionSecurityFilter() |
Modifier and Type | Method and Description |
---|---|
protected Principal |
getPrincipal(javax.servlet.http.HttpServletRequest request)
There can be many methods, session, cookie etc..
|
Class<Principal> |
getPrincipalTypeRequired()
If
Principal user derived is not of type principalTypeRequired then IAuthorizationService.AuthState.DENY |
void |
initFilterBean() |
protected boolean |
isRequestForAuthKeyValid(javax.servlet.http.HttpServletRequest request)
Check request for query param
authKeyParamName .By default will compare to a valid session id. BY DEFAULT THIS LOOPS THROUGH ALL SESSIONS SO NOT IDEAL FOR PRODUCTION. |
protected boolean |
isRequestForSessionValid(javax.servlet.http.HttpServletRequest request)
Check if the request targeted to the Service, is bound to a valid session.
|
protected boolean |
isRequestValid(javax.servlet.http.HttpServletRequest request)
Check if the request is valid based on the user logged in, or authentication/authorized to use this service.
|
void |
setAuthKeyParamName(String authKeyParamName)
Allow a request param called that can pass in auth key, instead of relying on session.
This represents the name of the query param. |
void |
setAuthorizations(String authorizatonSetJSONString)
Any/Atleast-one of the authorizations should be with the user
|
void |
setKeyValidationTransformerBeanName(String keyValidationTransformerBeanName)
Bean name of the Spring instantiated
FunctionTransformer keyValidationTransformer . |
void |
setModuleName(String moduleName) |
void |
setPrincipalTypeRequired(Class<Principal> principalTypeRequired)
If
Principal user derived is not of type principalTypeRequired then IAuthorizationService.AuthState.DENY |
doFilterInternal, isAjaxRequest, setAjaxRequestTokens, setLoginPageRedirectUrl, setRejectIfNotAjax
doFilter, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
public void setAuthKeyParamName(String authKeyParamName)
isRequestForAuthKeyValid(HttpServletRequest)
public void initFilterBean() throws javax.servlet.ServletException
initFilterBean
in class org.springframework.web.filter.GenericFilterBean
javax.servlet.ServletException
public void setAuthorizations(String authorizatonSetJSONString)
config
- public void setModuleName(String moduleName)
protected boolean isRequestForSessionValid(javax.servlet.http.HttpServletRequest request) throws org.springframework.security.access.AuthorizationServiceException
org.springframework.security.access.AuthorizationServiceException
protected boolean isRequestForAuthKeyValid(javax.servlet.http.HttpServletRequest request) throws org.springframework.security.access.AuthorizationServiceException
authKeyParamName
.request
- as HttpServletRequest
org.springframework.security.access.AuthorizationServiceException
authKeyParamName
protected boolean isRequestValid(javax.servlet.http.HttpServletRequest request) throws org.springframework.security.access.AuthorizationServiceException
AjaxSecurityFilter
isRequestValid
in class AjaxSecurityFilter
org.springframework.security.access.AuthorizationServiceException
protected Principal getPrincipal(javax.servlet.http.HttpServletRequest request)
AjaxSecurityFilter
getPrincipal
in class AjaxSecurityFilter
public Class<Principal> getPrincipalTypeRequired()
Principal
user derived is not of type principalTypeRequired then IAuthorizationService.AuthState.DENY
public void setPrincipalTypeRequired(Class<Principal> principalTypeRequired)
Principal
user derived is not of type principalTypeRequired then IAuthorizationService.AuthState.DENY
public void setKeyValidationTransformerBeanName(String keyValidationTransformerBeanName)
FunctionTransformer
keyValidationTransformer
.keyValidationTransformer
authKeyParamName
is deinfed then this defaults to AjaxSiteSessionSecurityFilter.KeyAsSessionIdTransformer
Copyright © 2018. All rights reserved.