Package org.purl.sword.base

Examples of org.purl.sword.base.SWORDAuthenticationException


      {
        oboEmail = swordContext.getOnBehalfOf().getEmail();
      }
      log.info(LogManager.getHeader(context, "deposit_failed_authorisation", "user=" +
          swordContext.getAuthenticated().getEmail() + ",on_behalf_of=" + oboEmail));
      throw new SWORDAuthenticationException("Cannot submit to the given collection with this context");
    }

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


    String password = sdr.getPassword();
    if ((username != null) && (password != null) &&
      (((username.equals("")) && (password.equals(""))) ||
         (!username.equalsIgnoreCase(password))) ) {
        // User not authenticated
        throw new SWORDAuthenticationException("Bad credentials");
    }
   
    // Allow users to force the throwing of a SWORD error exception by setting
    // the OBO user to 'error'
    if ((sdr.getOnBehalfOf() != null) && (sdr.getOnBehalfOf().equals("error"))) {
View Full Code Here

    String password = deposit.getPassword();
    if ((username != null) && (password != null) &&
      (((username.equals("")) && (password.equals(""))) ||
       (!username.equalsIgnoreCase(password))) ) {
      // User not authenticated
      throw new SWORDAuthenticationException("Bad credentials");
    }
   
    // Check this is a collection that takes obo deposits, else thrown an error
    if (((deposit.getOnBehalfOf() != null) && (!deposit.getOnBehalfOf().equals(""))) &&
          (!deposit.getLocation().contains("deposit?user="))) {
View Full Code Here

    String password = adr.getPassword();
    if ((username != null) && (password != null) &&
        (((username.equals("")) && (password.equals(""))) ||
        (!username.equalsIgnoreCase(password))) ) {
      // User not authenticated
      throw new SWORDAuthenticationException("Bad credentials");
    }
   
    return new AtomDocumentResponse(HttpServletResponse.SC_OK);
  }
View Full Code Here

    String password = sdr.getPassword();
    if ((username != null) && (password != null) &&
      (((username.equals("")) && (password.equals(""))) ||
         (!username.equalsIgnoreCase(password))) ) {
        // User not authenticated
        throw new SWORDAuthenticationException("Bad credentials");
    }
   
    // Allow users to force the throwing of a SWORD error exception by setting
    // the OBO user to 'error'
    if ((sdr.getOnBehalfOf() != null) && (sdr.getOnBehalfOf().equals("error"))) {
View Full Code Here

    String password = deposit.getPassword();
    if ((username != null) && (password != null) &&
      (((username.equals("")) && (password.equals(""))) ||
       (!username.equalsIgnoreCase(password))) ) {
      // User not authenticated
      throw new SWORDAuthenticationException("Bad credentials");
    }
   
    // Check this is a collection that takes obo deposits, else thrown an error
    if (((deposit.getOnBehalfOf() != null) && (!deposit.getOnBehalfOf().equals(""))) &&
          (!deposit.getLocation().contains("deposit?user="))) {
View Full Code Here

    String password = adr.getPassword();
    if ((username != null) && (password != null) &&
        (((username.equals("")) && (password.equals(""))) ||
        (!username.equalsIgnoreCase(password))) ) {
      // User not authenticated
      throw new SWORDAuthenticationException("Bad credentials");
    }
   
    return new AtomDocumentResponse(HttpServletResponse.SC_OK);
  }
View Full Code Here

      {
        oboEmail = swordContext.getOnBehalfOf().getEmail();
      }
      log.info(LogManager.getHeader(context, "deposit_failed_authorisation", "user=" +
          swordContext.getAuthenticated().getEmail() + ",on_behalf_of=" + oboEmail));
      throw new SWORDAuthenticationException("Cannot submit to the given collection with this context");
    }

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

TOP

Related Classes of org.purl.sword.base.SWORDAuthenticationException

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.