All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.imsglobal.lti.launch.LtiVerifier Maven / Gradle / Ivy

Go to download

BasicLTI Utilities are a set of utility classes to aid in the development of BasicLTI consumers and providers. They deal with much of the heavy lifting and make the process more opaque to the developer.

The newest version!
package org.imsglobal.lti.launch;


import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * This interface contains methods that verify HttpRequests
 * and generic request parameters according to the LTI
 * specification.
 * @author  Paul Gray
 * @since   1.1
 */
public interface LtiVerifier {

    /**
     * This method will verify the HttpServletRequest.
     *
     * @param request the HttpServletRequest that will be verified
     * @param secret the secret to verify the properties with
     * @return an LtiVerificationResult which will
     * contain information about the request (whether or
     * not it is valid, and if it is valid, contextual
     * information about the request).
     * @throws LtiVerificationException
     */
    public LtiVerificationResult verify(HttpServletRequest request, String secret) throws LtiVerificationException;

    /**
     * This method will verify a list of properties (mapped
     * by key & value).
     * @param parameters the parameters that will be verified. mapped by key & value
     * @param url the url this request was made at
     * @param method the method this url was requested with
     * @param secret the secret to verify the propertihes with
     * @return an LtiVerificationResult which will
     * contain information about the request (whether or
     * not it is valid, and if it is valid, contextual
     * information about the request).
     * @throws LtiVerificationException
     */
    public LtiVerificationResult verifyParameters(Map parameters, String url, String method, String secret) throws LtiVerificationException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy