当前位置: 首页>>代码示例>>Java>>正文


Java InterceptorStatusToken类代码示例

本文整理汇总了Java中org.springframework.security.access.intercept.InterceptorStatusToken的典型用法代码示例。如果您正苦于以下问题:Java InterceptorStatusToken类的具体用法?Java InterceptorStatusToken怎么用?Java InterceptorStatusToken使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


InterceptorStatusToken类属于org.springframework.security.access.intercept包,在下文中一共展示了InterceptorStatusToken类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: invoke

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
public void invoke(FilterInvocation fi) throws IOException,
		ServletException {
	if ((fi.getRequest() != null) && (fi.getRequest().getAttribute(FILTER_APPLIED) != null) && observeOncePerRequest) {
		fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
	} else {
		if (fi.getRequest() != null) {
			fi.getRequest().setAttribute(FILTER_APPLIED, Boolean.TRUE);
		}
		InterceptorStatusToken token = super.beforeInvocation(fi);
		try {
			fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
		} finally {
			super.finallyInvocation(token);
		}
		super.afterInvocation(token, null);
	}
}
 
开发者ID:xiaolongzuo,项目名称:zxl,代码行数:18,代码来源:ResourceSecurityFilter.java

示例2: invoke

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
public void invoke(FilterInvocation fi) throws IOException, ServletException {
    //fi里面有一个被拦截的url
    //里面调用MyInvocationSecurityMetadataSource的getAttributes(Object object)这个方法获取fi对应的所有权限
    //再调用MyAccessDecisionManager的decide方法来校验用户的权限是否足够
    InterceptorStatusToken token = super.beforeInvocation(fi);
    try {
    //执行下一个拦截器
        fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
    } finally {
        super.afterInvocation(token, null);
    }
}
 
开发者ID:luotuo,项目名称:springboot-security-wechat,代码行数:13,代码来源:MyFilterSecurityInterceptor.java

示例3: invoke

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
private void invoke(FilterInvocation fi) throws IOException, ServletException {
    InterceptorStatusToken token = super.beforeInvocation(fi);
    try {
        fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
    } catch (Exception e) {
        logger.error(e.getMessage());
    } finally {
        super.afterInvocation(token, null);
    }
}
 
开发者ID:DomKing,项目名称:busi-support,代码行数:11,代码来源:CustomerFilterSecurityInterceptor.java

示例4: invoke

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
public void invoke(FilterInvocation fi) throws IOException, ServletException {
    //fi里面有一个被拦截的url
    //里面调用MyInvocationSecurityMetadataSource的getAttributes(Object object)这个方法获取fi对应的所有权限
    //再调用MyAccessDecisionManager的decide方法来校验用户的权限是否足够
    InterceptorStatusToken token = super.beforeInvocation(fi);
    try {
        //执行下一个拦截器
        fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
    } finally {
        super.afterInvocation(token, null);
    }
}
 
开发者ID:realxujiang,项目名称:itweet-boot,代码行数:13,代码来源:MyFilterSecurityInterceptor.java

示例5: invoke

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
private void invoke(FilterInvocation fi) throws IOException, ServletException {
	//System.out.println("--------------------MaxSecurityFilter invoke--------------");
	InterceptorStatusToken token = super.beforeInvocation(fi);
	try {
		fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
	} finally {
		super.afterInvocation(token, null);
	}
}
 
开发者ID:Fetax,项目名称:Fetax-AI,代码行数:10,代码来源:MainSecurityFilter.java

示例6: invoke

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
public void invoke(FilterInvocation fi) throws IOException, ServletException {

        InterceptorStatusToken token = super.beforeInvocation(fi);
        try {
            fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
        } finally {
            super.afterInvocation(token, null);
        }
    }
 
开发者ID:jeikerxiao,项目名称:SpringBootStudy,代码行数:10,代码来源:DemoSecurityInterceptor.java

示例7: doFilter

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
    FilterInvocation fi = new FilterInvocation(request, response, chain);
    //fi里面有一个被拦截的url
    //里面调用MyInvocationSecurityMetadataSource的getAttributes(Object object)这个方法获取fi对应的所有权限
    //再调用MyAccessDecisionManager的decide方法来校验用户的权限是否足够
    InterceptorStatusToken token = super.beforeInvocation(fi);
    try {
        //执行下一个拦截器
        fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
    } finally {
        super.afterInvocation(token, null);
    }
}
 
开发者ID:finefuture,项目名称:data-migration,代码行数:15,代码来源:OwnSecurityInterceptor.java

示例8: invoke

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
public void invoke(FilterInvocation fi) throws IOException, ServletException{
	InterceptorStatusToken token = super.beforeInvocation(fi);
	try{
		fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
	}finally{
		super.afterInvocation(token, null);
	}
}
 
开发者ID:wanliyang10010,项目名称:Shop,代码行数:9,代码来源:MyFilterSecurityInterceptor.java

示例9: intercept

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
@Override
public String intercept( ActionInvocation invocation )
    throws Exception
{
    ActionConfig actionConfig = invocation.getProxy().getConfig();
    definitionSourceTag.set( requiredAuthoritiesProvider.createSecurityMetadataSource( actionConfig ) );

    InterceptorStatusToken token = beforeInvocation( actionConfig );

    addActionAccessResolver( invocation );

    Object result = null;
    try
    {
        result = invocation.invoke();
    }
    finally
    {
        result = afterInvocation( token, result );

        definitionSourceTag.remove();
    }

    if ( result != null )
    {
        return result.toString();
    }

    return null;
}
 
开发者ID:dhis2,项目名称:dhis2-core,代码行数:31,代码来源:XWorkSecurityInterceptor.java

示例10: preHandle

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
@Override
public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Object handler) throws Exception {
  if (handler instanceof HandlerMethod) {
    HandlerInvocation hi = new HandlerInvocation(req, resp, (HandlerMethod) handler);
    InterceptorStatusToken token = super.beforeInvocation(hi);
    tokenTL.set(token);
  }
  return true;
}
 
开发者ID:mateuszwenus,项目名称:spring-security-controller-auth,代码行数:10,代码来源:HandlerSecurityInterceptor.java

示例11: afterCompletion

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
@Override
public void afterCompletion(HttpServletRequest req, HttpServletResponse resp, Object handler, Exception exc) throws Exception {
  InterceptorStatusToken token = tokenTL.get();
  if (token != null) {
    tokenTL.set(null);
    super.finallyInvocation(token);
    super.afterInvocation(token, null);
  }
}
 
开发者ID:mateuszwenus,项目名称:spring-security-controller-auth,代码行数:10,代码来源:HandlerSecurityInterceptor.java

示例12: invoke

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
private void invoke(FilterInvocation fi) throws IOException, ServletException {  
     // object为FilterInvocation对象   
     //super.beforeInvocation(fi);源码   
     //1.获取请求资源的权限   
     //执行Collection<ConfigAttribute> attributes = SecurityMetadataSource.getAttributes(object);
     //2.是否拥有权限   
     //this.accessDecisionManager.decide(authenticated, object, attributes);
     InterceptorStatusToken token = super.beforeInvocation(fi);
     try {
        fi.getChain().doFilter(fi.getRequest(), fi.getResponse());  
     } finally {
         super.afterInvocation(token, null);  
     }  
}
 
开发者ID:545473750,项目名称:zswxsqxt,代码行数:15,代码来源:MySecurityFilter.java

示例13: doFilter

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
@Override
public void doFilter(ServletRequest request, ServletResponse response,
		FilterChain chain) throws IOException, ServletException {
	// 1.获取请求资源的权限
	// 2.是否拥有权限
	FilterInvocation fi = new FilterInvocation(request, response, chain);
	InterceptorStatusToken token = super.beforeInvocation(fi);
	try {
		fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
	} finally {
		super.afterInvocation(token, null);
	}
}
 
开发者ID:cjm0000000,项目名称:mmt,代码行数:14,代码来源:MMTSecurityFilter.java

示例14: invoke

import org.springframework.security.access.intercept.InterceptorStatusToken; //导入依赖的package包/类
/**
 * Invoke.
 * 
 * @param fi
 *            the fi
 * @throws IOException
 *             Signals that an I/O exception has occurred.
 * @throws ServletException
 *             the servlet exception
 */
public void invoke(FilterInvocation fi) throws IOException, ServletException {
	log.debug("invoke calling");
	InterceptorStatusToken token = super.beforeInvocation(fi);
	try {
		fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
	} finally {
		super.afterInvocation(token, null);
	}
}
 
开发者ID:8090boy,项目名称:gomall.la,代码行数:20,代码来源:MyFilterSecurityInterceptor.java


注:本文中的org.springframework.security.access.intercept.InterceptorStatusToken类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。