org.imsglobal.lti.launch.LtiVerifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of basiclti-util Show documentation
Show all versions of basiclti-util Show documentation
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;
}