Package org.swordapp.server

Examples of org.swordapp.server.SwordAuthException


      return result;
    }
    catch (AuthorizeException e)
    {
      throw new SwordAuthException(e);
    }
    catch (SQLException e)
    {
      throw new DSpaceSwordException(e);
    }
View Full Code Here


      {
        // decide what kind of error to throw
        if (ep != null)
        {
          log.info(LogManager.getHeader(context, "sword_unable_to_set_user", "username=" + un));
          throw new SwordAuthException("Unable to authenticate with the supplied credentials");
        }
        else
        {
          // FIXME: this shouldn't ever happen now, but may as well leave it in just in case
          // there's a bug elsewhere
          log.info(LogManager.getHeader(context, "sword_unable_to_set_on_behalf_of", "username=" + un + ",on_behalf_of=" + obo));
          throw new SwordAuthException("Unable to authenticate the onBehalfOf account");
        }
      }
     
      return sc;
    }
    catch (SQLException e)
    {
      log.error("caught exception: ", e);
      throw new DSpaceSwordException("There was a problem accessing the repository user database", e);
    }
    catch (AuthorizeException e)
    {
      log.error("caught exception: ", e);
      throw new SwordAuthException("There was a problem authenticating or authorising the user", e);
    }
  }
View Full Code Here

        {
            throw new SwordServerException(e);
        }
        catch (AuthorizeException e)
        {
            throw new SwordAuthException(e);
        }
    }
View Full Code Here

                    // and re-verify its accessibility
                    accessible = this.isAccessible(ctx, bitstream);
                    if (!accessible)
                    {
                        throw new SwordAuthException();
                    }
                }

                // if we get to here we are either allowed to access the bitstream without credentials,
                // or we have been authenticated with acceptable credentials
View Full Code Here

                    {
                        oboEmail = sc.getOnBehalfOf().getEmail();
                    }
                    log.info(LogManager.getHeader(context, "replace_failed_authorisation", "user=" +
                            sc.getAuthenticated().getEmail() + ",on_behalf_of=" + oboEmail));
                    throw new SwordAuthException("Cannot replace the given item with this context");
                }

                // make a note of the authentication in the verbose string
                this.verboseDescription.append("Authenticated user: " + sc.getAuthenticated().getEmail());
                if (sc.getOnBehalfOf() != null)
View Full Code Here

          {
            oboEmail = sc.getOnBehalfOf().getEmail();
          }
          log.info(LogManager.getHeader(context, "replace_failed_authorisation", "user=" +
              sc.getAuthenticated().getEmail() + ",on_behalf_of=" + oboEmail));
          throw new SwordAuthException("Cannot replace the given item with this context");
        }

        // make a note of the authentication in the verbose string
        this.verboseDescription.append("Authenticated user: " + sc.getAuthenticated().getEmail());
        if (sc.getOnBehalfOf() != null)
View Full Code Here

                {
                    oboEmail = sc.getOnBehalfOf().getEmail();
                }
                log.info(LogManager.getHeader(context, "replace_failed_authorisation", "user=" +
                        sc.getAuthenticated().getEmail() + ",on_behalf_of=" + oboEmail));
                throw new SwordAuthException("Cannot replace the given item with this context");
            }

            // make a note of the authentication in the verbose string
            this.verboseDescription.append("Authenticated user: " + sc.getAuthenticated().getEmail());
            if (sc.getOnBehalfOf() != null)
View Full Code Here

    {
      throw new DSpaceSwordException(e);
    }
    catch (AuthorizeException e)
    {
      throw new SwordAuthException(e);
    }
    catch (IOException e)
    {
      throw new DSpaceSwordException(e);
    }
View Full Code Here

    {
      throw new DSpaceSwordException(e);
    }
    catch (AuthorizeException e)
    {
      throw new SwordAuthException(e);
    }
    catch (IOException e)
    {
      throw new DSpaceSwordException(e);
    }
View Full Code Here

    {
      throw new DSpaceSwordException(e);
    }
    catch (AuthorizeException e)
    {
      throw new SwordAuthException(e);
    }
    catch (IOException e)
    {
      throw new DSpaceSwordException(e);
    }
View Full Code Here

TOP

Related Classes of org.swordapp.server.SwordAuthException

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.