Examples of UnauthorizedException


Examples of org.nemesis.forum.webapp.exception.UnauthorizedException

      return;
    if (OperationConstants.LIST_FORUM == operationConstant
      && (SecurityTools.isForumAdmin(getAuthToken(request)) || SecurityTools.isForumModerator(getAuthToken(request))))
      return;

    throw new UnauthorizedException();

  }
View Full Code Here

Examples of org.openrdf.http.protocol.UnauthorizedException

      }
      catch (UnsupportedMediaType e) {
        throw new UnsupportedRDFormatException(e);
      }
      catch (Unauthorized e) {
        throw new UnauthorizedException(e);
      }
      catch (HTTPException e) {
        throw new StoreException(e);
      }
      return request;
View Full Code Here

Examples of org.openrdf.http.protocol.UnauthorizedException

    }
    catch (UnsupportedMediaType e) {
      throw new UnsupportedRDFormatException(e);
    }
    catch (Unauthorized e) {
      throw new UnauthorizedException(e);
    }
    catch (HTTPException e) {
      throw new StoreException(e);
    }
  }
View Full Code Here

Examples of org.openrdf.http.protocol.UnauthorizedException

    }
    catch (UnsupportedMediaType e) {
      throw new UnsupportedRDFormatException(e);
    }
    catch (Unauthorized e) {
      throw new UnauthorizedException(e);
    }
    catch (HTTPException e) {
      throw new StoreException(e);
    }
  }
View Full Code Here

Examples of org.openrdf.http.protocol.UnauthorizedException

    }
    catch (UnsupportedFileFormat e) {
      throw new UnsupportedRDFormatException(e);
    }
    catch (Unauthorized e) {
      throw new UnauthorizedException(e);
    }
    catch (HTTPException e) {
      throw new StoreException(e);
    }
  }
View Full Code Here

Examples of org.openrdf.http.protocol.UnauthorizedException

      }
      catch (UnsupportedMediaType e) {
        throw new UnsupportedRDFormatException(e);
      }
      catch (Unauthorized e) {
        throw new UnauthorizedException(e);
      }
      catch (HTTPException e) {
        throw new StoreException(e);
      }
      return request.read(type);
View Full Code Here

Examples of org.openrdf.http.protocol.UnauthorizedException

    }
    catch (UnsupportedFileFormat e) {
      throw new UnsupportedRDFormatException(e);
    }
    catch (Unauthorized e) {
      throw new UnauthorizedException(e);
    }
    catch (HTTPException e) {
      throw new StoreException(e);
    }
  }
View Full Code Here

Examples of org.openrdf.http.protocol.UnauthorizedException

    }
    catch (UnsupportedMediaType e) {
      throw new UnsupportedRDFormatException(e);
    }
    catch (Unauthorized e) {
      throw new UnauthorizedException(e);
    }
    catch (HTTPException e) {
      throw new StoreException(e);
    }
  }
View Full Code Here

Examples of org.sonar.server.exceptions.UnauthorizedException

    return comment;
  }

  private void verifyLoggedIn(UserSession userSession) {
    if (!userSession.isLoggedIn()) {
      throw new UnauthorizedException("User is not logged in");
    }
  }
View Full Code Here

Examples of org.structr.core.auth.exception.UnauthorizedException

    }

    // no grants => no access rights
    if (resourceAccess == null) {

      throw new UnauthorizedException("Forbidden");

    } else {

      switch (method) {

        case GET :

          if (!validUser && resourceAccess.hasFlag(NON_AUTH_USER_GET)) {

            return;

          }

          if (validUser && resourceAccess.hasFlag(AUTH_USER_GET)) {

            return;

          }

          break;

        case PUT :

          if (!validUser && resourceAccess.hasFlag(NON_AUTH_USER_PUT)) {

            return;

          }

          if (validUser && resourceAccess.hasFlag(AUTH_USER_PUT)) {

            return;

          }

          break;

        case POST :

          if (!validUser && resourceAccess.hasFlag(NON_AUTH_USER_POST)) {

            return;

          }

          if (validUser && resourceAccess.hasFlag(AUTH_USER_POST)) {

            return;

          }

          break;

        case DELETE :

          if (!validUser && resourceAccess.hasFlag(NON_AUTH_USER_DELETE)) {

            return;

          }

          if (validUser && resourceAccess.hasFlag(AUTH_USER_DELETE)) {

            return;

          }

          break;

        case OPTIONS :

          if (!validUser && resourceAccess.hasFlag(NON_AUTH_USER_OPTIONS)) {

            return;

          }

          if (validUser && resourceAccess.hasFlag(AUTH_USER_OPTIONS)) {

            return;

          }

          break;

        case HEAD :

          if (!validUser && resourceAccess.hasFlag(NON_AUTH_USER_HEAD)) {

            return;

          }

          if (validUser && resourceAccess.hasFlag(AUTH_USER_HEAD)) {

            return;

          }

          break;
      }
    }

    throw new UnauthorizedException("Forbidden");

  }
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.