本文整理了Java中org.apache.catalina.connector.Request.setMethod
方法的一些代码示例,展示了Request.setMethod
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setMethod
方法的具体详情如下:
包路径:org.apache.catalina.connector.Request
类名称:Request
方法名:setMethod
[英]Set the HTTP request method used for this Request.
[中]设置用于此请求的HTTP请求方法。
代码示例来源:origin: org.glassfish.main.security/websecurity
public void setMethod(String method) {
httpRequest.setMethod(method);
}
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas7
private void handleSAML2UnsolicitedResponse(Request request, Response response) throws ServletException {
SAML2Request samlRequest = new SAML2Request();
String id = IDGenerator.create("ID_");
String assertionConsumerURL = request.getParameter(JBossSAMLConstants.UNSOLICITED_RESPONSE_TARGET.get());
try {
AuthnRequestType authn = samlRequest
.createAuthnRequestType(id, assertionConsumerURL, getIdentityURL(), assertionConsumerURL);
String requestedBinding = request.getParameter(JBossSAMLConstants.UNSOLICITED_RESPONSE_SAML_BINDING.get());
if ("POST".equalsIgnoreCase(requestedBinding)) {
authn.setProtocolBinding(URI.create(JBossSAMLURIConstants.SAML_HTTP_POST_BINDING.get()));
request.setMethod("POST");
} else {
authn.setProtocolBinding(URI.create(JBossSAMLURIConstants.SAML_HTTP_REDIRECT_BINDING.get()));
}
authn.setUnsolicitedResponse(true);
processSAMLRequestMessage(request, response, authn, true);
} catch (Exception e) {
throw new ServletException("Could not handle SAML 2.0 Unsolicited Response.", e);
}
}
代码示例来源:origin: org.picketlink/picketlink-tomcat-common
private void handleSAML2UnsolicitedResponse(Request request, Response response) throws ServletException {
SAML2Request samlRequest = new SAML2Request();
String id = IDGenerator.create("ID_");
String assertionConsumerURL = request.getParameter(JBossSAMLConstants.UNSOLICITED_RESPONSE_TARGET.get());
try {
AuthnRequestType authn = samlRequest
.createAuthnRequestType(id, assertionConsumerURL, getIdentityURL(), assertionConsumerURL);
String requestedBinding = request.getParameter(JBossSAMLConstants.UNSOLICITED_RESPONSE_SAML_BINDING.get());
if ("POST".equalsIgnoreCase(requestedBinding)) {
authn.setProtocolBinding(URI.create(JBossSAMLURIConstants.SAML_HTTP_POST_BINDING.get()));
request.setMethod("POST");
} else {
authn.setProtocolBinding(URI.create(JBossSAMLURIConstants.SAML_HTTP_REDIRECT_BINDING.get()));
}
authn.setUnsolicitedResponse(true);
processSAMLRequestMessage(request, response, authn, true);
} catch (Exception e) {
throw new ServletException("Could not handle SAML 2.0 Unsolicited Response.", e);
}
}
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas5
private void handleSAML2UnsolicitedResponse(Request request, Response response) throws ServletException {
SAML2Request samlRequest = new SAML2Request();
String id = IDGenerator.create("ID_");
String assertionConsumerURL = request.getParameter(JBossSAMLConstants.UNSOLICITED_RESPONSE_TARGET.get());
try {
AuthnRequestType authn = samlRequest
.createAuthnRequestType(id, assertionConsumerURL, getIdentityURL(), assertionConsumerURL);
String requestedBinding = request.getParameter(JBossSAMLConstants.UNSOLICITED_RESPONSE_SAML_BINDING.get());
if ("POST".equalsIgnoreCase(requestedBinding)) {
authn.setProtocolBinding(URI.create(JBossSAMLURIConstants.SAML_HTTP_POST_BINDING.get()));
request.setMethod("POST");
} else {
authn.setProtocolBinding(URI.create(JBossSAMLURIConstants.SAML_HTTP_REDIRECT_BINDING.get()));
}
authn.setUnsolicitedResponse(true);
processSAMLRequestMessage(request, response, authn, true);
} catch (Exception e) {
throw new ServletException("Could not handle SAML 2.0 Unsolicited Response.", e);
}
}
代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat
request.setMethod(saved.getMethod());
request.setQueryString(saved.getQueryString());
request.setRequestURI(saved.getRequestURI());
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas7
request.setMethod(saved.getMethod());
request.setQueryString(saved.getQueryString());
request.setRequestURI(saved.getRequestURI());
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas5
request.setMethod(saved.getMethod());
request.setQueryString(saved.getQueryString());
request.setRequestURI(saved.getRequestURI());
内容来源于网络,如有侵权,请联系作者删除!