Examples of UnAuthorizedException


Examples of org.jayasoft.woj.common.services.security.UnauthorizedException

        super(name);
    }

    protected void checkAuthorization(UAK uak, Map params) {
        if (!uak.isServer()) {
            throw new UnauthorizedException(uak, getName());
        }
    }
View Full Code Here

Examples of org.jboss.errai.security.shared.exception.UnauthorizedException

              return true;
            }
          });
        }
        else {
          throw new UnauthorizedException();
        }
      }
      else {
        throw new UnauthenticatedException();
      }
View Full Code Here

Examples of org.jboss.errai.security.shared.exception.UnauthorizedException

    if (User.ANONYMOUS.equals(user)) {
      throw new UnauthenticatedException();
    }
    else if (!user.hasAllRoles(roles)) {
      throw new UnauthorizedException();
    }
    else {
      return context.proceed();
    }
  }
View Full Code Here

Examples of org.jboss.errai.security.shared.exception.UnauthorizedException

    final RestrictedAccess annotation = getRestrictedAccessAnnotation(context.getTarget().getClass(), context.getMethod());
    if (user == null) {
      throw new UnauthenticatedException();
    }
    else if (!hasAllRoles(user.getRoles(), annotation.roles())) {
      throw new UnauthorizedException();
    } else {
      return context.proceed();
    }
  }
View Full Code Here

Examples of org.jboss.errai.security.shared.exception.UnauthorizedException

              return true;
            }
          });
        }
        else {
          throw new UnauthorizedException();
        }
      }
      else {
        throw new UnauthenticatedException();
      }
View Full Code Here

Examples of org.jboss.errai.security.shared.exception.UnauthorizedException

            context.getMethod());
    if (User.ANONYMOUS.equals(user)) {
      throw new UnauthenticatedException();
    }
    else if (!user.hasAllRoles(annotation.roles())) {
      throw new UnauthorizedException();
    }
    else {
      return context.proceed();
    }
  }
View Full Code Here

Examples of org.jboss.resteasy.spi.UnauthorizedException

      return rolesAllowed != null || denyAll;
   }

   public ServerResponse preProcess(HttpRequest request, ResourceMethod method) throws Failure, WebApplicationException
   {
      if (denyAll) throw new UnauthorizedException();
      if (rolesAllowed != null)
      {
         SecurityContext context = ResteasyProviderFactory.getContextData(SecurityContext.class);
         if (context != null)
         {
            for (String role : rolesAllowed)
            {
               if (context.isUserInRole(role)) return null;
            }
            throw new UnauthorizedException();
         }
      }
      return null;
   }
View Full Code Here

Examples of org.jivesoftware.openfire.auth.UnauthorizedException

                    sessionManager.userBroadcast(recipientJID.getNode(), itemPacket);
                }
            }
        }
        catch (UserNotFoundException e) {
            throw new UnauthorizedException(e);
        }
    }
View Full Code Here

Examples of org.jivesoftware.xmpp.workgroup.UnauthorizedException

            pstmt.setLong(5, queueID);
            pstmt.executeUpdate();
        }
        catch (SQLException e) {
            Log.error(LocaleUtils.getLocalizedString("admin.error"), e);
            throw new UnauthorizedException();
        }
        finally {
            DbConnectionManager.closeConnection(pstmt, con);
        }
    }
View Full Code Here

Examples of org.nemesis.forum.exception.UnauthorizedException

  }

  public static void flush(Authorization auth) throws UnauthorizedException{
    ForumFactory forumFactory = ForumFactory.getInstance(auth);
    if(! forumFactory.getPermissions(auth).get(Constants.SYSTEM_ADMIN)) throw new UnauthorizedException();
    try {
      IndexWriter writer = new IndexWriter(new File(PATH), new StopAnalyzer(), true);
      writer.close();
    } catch (IOException e) {
      log.error("impossible de flusher l'index ", e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.