Added servlet request back to the checksums
This commit is contained in:
parent
b6de2a1b55
commit
99176af136
@ -16,9 +16,12 @@ public abstract class Checksum {
|
||||
|
||||
protected String queryStringWithoutChecksum;
|
||||
|
||||
public Checksum(String apiCall, String checksum) {
|
||||
protected HttpServletRequest request;
|
||||
|
||||
public Checksum(String apiCall, String checksum, HttpServletRequest request) {
|
||||
this.apiCall = ParamsUtil.sanitizeString(apiCall);
|
||||
this.checksum = ParamsUtil.sanitizeString(checksum);
|
||||
this.request = request;
|
||||
}
|
||||
|
||||
public String getApiCall() {
|
||||
@ -44,4 +47,12 @@ public abstract class Checksum {
|
||||
public void setQueryStringWithoutChecksum(String queryStringWithoutChecksum) {
|
||||
this.queryStringWithoutChecksum = queryStringWithoutChecksum;
|
||||
}
|
||||
|
||||
public void setRequest(HttpServletRequest request) {
|
||||
this.request = request;
|
||||
}
|
||||
|
||||
public HttpServletRequest getRequest() {
|
||||
return request;
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,8 @@ public class GetChecksum extends Checksum {
|
||||
@NotEmpty(message = "You must provide the query string")
|
||||
private String queryString;
|
||||
|
||||
public GetChecksum(String apiCall, String checksum, String queryString) {
|
||||
super(apiCall, checksum);
|
||||
public GetChecksum(String apiCall, String checksum, String queryString, HttpServletRequest request) {
|
||||
super(apiCall, checksum, request);
|
||||
this.queryString = ParamsUtil.sanitizeString(queryString);
|
||||
removeChecksumFromQueryString();
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ public class ValidationService {
|
||||
|
||||
switch(apiCall.requestType) {
|
||||
case GET:
|
||||
checksum = new GetChecksum(apiCall.getName(), checksumValue, queryString);
|
||||
checksum = new GetChecksum(apiCall.getName(), checksumValue, queryString, servletRequest);
|
||||
switch(apiCall) {
|
||||
case CREATE:
|
||||
request = new CreateMeeting(checksum, servletRequest);
|
||||
|
Loading…
Reference in New Issue
Block a user