Package org.owasp.csrfguard

Examples of org.owasp.csrfguard.CsrfGuardException


    String errorPage = getParameter("Page");

    try {
      response.sendRedirect(errorPage);
    } catch (IOException ioe) {
      throw new CsrfGuardException(ioe);
    }
  }
View Full Code Here


    String message = getParameter("Message");

    try {
      response.sendError(code, message);
    } catch (IOException ioe) {
      throw new CsrfGuardException(ioe);
    }
  }
View Full Code Here

    try {
      token = RandomGenerator.generateRandomId(csrfGuard.getPrng(),
          csrfGuard.getTokenLength());
    } catch (Exception e) {
      throw new CsrfGuardException(String.format("unable to generate the random token - %s", e.getLocalizedMessage()), e);
    }

    session.setAttribute(csrfGuard.getSessionKey(), token);
  }
View Full Code Here

      String token = null;

      try {
        token = RandomGenerator.generateRandomId(csrfGuard.getPrng(), csrfGuard.getTokenLength());
      } catch (Exception e) {
        throw new CsrfGuardException(String.format("unable to generate the random token - %s", e.getLocalizedMessage()), e);
      }
     
      pageTokens.put(page, token);
    }
  }
View Full Code Here

    String errorPage = getParameter("Page");

    try {
      request.getRequestDispatcher(errorPage).forward(request, response);
    } catch (IOException ioe) {
      throw new CsrfGuardException(ioe);
    } catch (ServletException se) {
      throw new CsrfGuardException(se);
    }
  }
View Full Code Here

TOP

Related Classes of org.owasp.csrfguard.CsrfGuardException

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.