Examples of validateCrumb()


Examples of hudson.security.csrf.CrumbIssuer.validateCrumb()

    /**
     * Parses the credential information from a form submission.
     */
    public static UserProvidedCredential fromForm(StaplerRequest req, MultipartFormDataParser parser) throws IOException {
        CrumbIssuer crumbIssuer = Hudson.getInstance().getCrumbIssuer();
        if (crumbIssuer!=null && !crumbIssuer.validateCrumb(req, parser))
            throw HttpResponses.error(SC_FORBIDDEN,new IOException("No crumb found"));

        String kind = parser.get("kind");
        int idx = Arrays.asList("","password","publickey","certificate").indexOf(kind);

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.