Package org.beangle.security.web

Examples of org.beangle.security.web.FilterInvocation


   */
  public boolean isAuthorized(Authentication auth, Object resource) {
    loadResourceNecessary();
    String resourceName = null;
    if (resource instanceof FilterInvocation) {
      FilterInvocation fi = (FilterInvocation) resource;
      resourceName = authorityService.extractResource(RequestUtils.getServletPath(fi.getHttpRequest()));
    } else {
      resourceName = resource.toString();
    }
    //registe resourceName
    SecurityUtils.setResource(resourceName);
View Full Code Here


   * @throws ServletException
   *             if the filter chain fails
   */
  public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
      throws IOException, ServletException {
    FilterInvocation fi = new FilterInvocation(request, response, chain);
    invoke(fi);
  }
View Full Code Here

   * 1)检查是否是属于公有资源<br>
   * 2)检查用户组权限<br>
   */
  public boolean isAuthorized(Authentication auth, Object resource) {
    loadResourceNecessary();
    FilterInvocation fi = (FilterInvocation) resource;
    String resourceName = resourceExtractor.extract(fi.getHttpRequest());
    if (publicResources.contains(resourceName)) { return true; }
    if (AnonymousAuthentication.class.isAssignableFrom(auth.getClass())) { return false; }
    if (protectedResources.contains(resourceName)) { return true; }
    GrantedAuthority[] groups = auth.getAuthorities();
    if (null == groups) { return false; }
View Full Code Here

   */
  public boolean isAuthorized(Authentication auth, Object resource) {
    loadResourceNecessary();
    String resourceName = null;
    if (resource instanceof FilterInvocation) {
      FilterInvocation fi = (FilterInvocation) resource;
      resourceName = authorityService.extractResource(RequestUtils.getServletPath(fi.getHttpRequest()));
    } else {
      resourceName = resource.toString();
    }
    // registe resourceName
    SecurityUtils.setResource(resourceName);
View Full Code Here

   * 2)检查用户组权限<br> */
  public boolean isAuthorized(Authentication auth, Object resource) {
    loadResourceNecessary();
    String resourceName = null;
    if (resource instanceof FilterInvocation) {
      FilterInvocation fi = (FilterInvocation) resource;
      resourceName = authorityService.extractResource(RequestUtils.getServletPath(fi.getHttpRequest()));
    } else {
      resourceName = resource.toString();
    }
    // registe resourceName
    SecurityUtils.setResource(resourceName);
View Full Code Here

   * @throws ServletException
   *             if the filter chain fails
   */
  public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
      throws IOException, ServletException {
    FilterInvocation fi = new FilterInvocation(request, response, chain);
    invoke(fi);
  }
View Full Code Here

TOP

Related Classes of org.beangle.security.web.FilterInvocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.