You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.7 KiB
52 lines
1.7 KiB
3 years ago
|
package com.fr.plugin.jsd9683.webResourceProvider;
|
||
|
|
||
|
import com.fr.data.NetworkHelper;
|
||
|
import com.fr.decision.webservice.interceptor.DecisionInterceptor;
|
||
|
import com.fr.decision.webservice.interceptor.handler.TemplateRequestChecker;
|
||
|
import com.fr.decision.webservice.utils.DecisionServiceConstants;
|
||
|
import com.fr.log.FineLoggerFactory;
|
||
|
import com.fr.third.springframework.web.method.HandlerMethod;
|
||
|
|
||
|
import javax.servlet.http.HttpServletRequest;
|
||
|
import javax.servlet.http.HttpServletResponse;
|
||
|
|
||
|
public class MyTemplateRequestChecker extends TemplateRequestChecker {
|
||
|
@Override
|
||
|
public String getTemplateId(HttpServletRequest httpServletRequest, HandlerMethod handlerMethod) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean detectTemplateNeedAuthenticate(HttpServletRequest httpServletRequest, String s) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean detectTemplateRoleAuthority(HttpServletRequest httpServletRequest, String s, String s1) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean doesUserHaveAnyHyperlinkTempAuth(String s, String s1) throws Exception {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean acceptRequest(HttpServletRequest httpServletRequest, HandlerMethod handlerMethod) {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean checkRequest(HttpServletRequest request, HttpServletResponse httpServletResponse, HandlerMethod handlerMethod) throws Exception {
|
||
|
String hyperlinkUUIDKey = NetworkHelper.getHTTPRequestParameter(request, DecisionServiceConstants.FINE_AUTH_TOKEN_NAME_HYPERLINK);
|
||
|
FineLoggerFactory.getLogger().info("hyperlinkUUIDKey:" + hyperlinkUUIDKey);
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int toInteger() {
|
||
|
return 0;
|
||
|
}
|
||
|
}
|