本文整理了Java中org.openid4java.message.Message.wwwFormEncoding()
方法的一些代码示例,展示了Message.wwwFormEncoding()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.wwwFormEncoding()
方法的具体详情如下:
包路径:org.openid4java.message.Message
类名称:Message
方法名:wwwFormEncoding
暂无
代码示例来源:origin: org.openid4java/openid4java
/**
* Gets the URL where the message should be sent, where applicable.
* Null for received messages.
*
* @param httpGet If true, the wwwFormEncoding() is appended to the
* destination URL; the return value should be used
* with a GET-redirect.
* If false, the verbatim destination URL is returned,
* which should be used with a FORM POST redirect.
*
* @see #wwwFormEncoding()
*/
public String getDestinationUrl(boolean httpGet)
{
if (_destinationUrl == null)
throw new IllegalStateException("Destination URL not set; " +
"is this a received message?");
if (httpGet) // append wwwFormEncoding to the destination URL
{
boolean hasQuery = _destinationUrl.indexOf("?") > 0;
String initialChar = hasQuery ? "&" : "?";
return _destinationUrl + initialChar + wwwFormEncoding();
}
else // should send the keyValueFormEncoding in POST data
return _destinationUrl;
}
代码示例来源:origin: org.openid4java/openid4java-nodeps
/**
* Gets the URL where the message should be sent, where applicable.
* Null for received messages.
*
* @param httpGet If true, the wwwFormEncoding() is appended to the
* destination URL; the return value should be used
* with a GET-redirect.
* If false, the verbatim destination URL is returned,
* which should be used with a FORM POST redirect.
*
* @see #wwwFormEncoding()
*/
public String getDestinationUrl(boolean httpGet)
{
if (_destinationUrl == null)
throw new IllegalStateException("Destination URL not set; " +
"is this a received message?");
if (httpGet) // append wwwFormEncoding to the destination URL
{
boolean hasQuery = _destinationUrl.indexOf("?") > 0;
String initialChar = hasQuery ? "&" : "?";
return _destinationUrl + initialChar + wwwFormEncoding();
}
else // should send the keyValueFormEncoding in POST data
return _destinationUrl;
}
代码示例来源:origin: com.cloudbees/openid4java-shaded
/**
* Gets the URL where the message should be sent, where applicable.
* Null for received messages.
*
* @param httpGet If true, the wwwFormEncoding() is appended to the
* destination URL; the return value should be used
* with a GET-redirect.
* If false, the verbatim destination URL is returned,
* which should be used with a FORM POST redirect.
*
* @see #wwwFormEncoding()
*/
public String getDestinationUrl(boolean httpGet)
{
if (_destinationUrl == null)
throw new IllegalStateException("Destination URL not set; " +
"is this a received message?");
if (httpGet) // append wwwFormEncoding to the destination URL
{
boolean hasQuery = _destinationUrl.indexOf("?") > 0;
String initialChar = hasQuery ? "&" : "?";
return _destinationUrl + initialChar + wwwFormEncoding();
}
else // should send the keyValueFormEncoding in POST data
return _destinationUrl;
}
代码示例来源:origin: org.wso2.org.openid4java/openid4java-nodeps
/**
* Gets the URL where the message should be sent, where applicable.
* Null for received messages.
*
* @param httpGet If true, the wwwFormEncoding() is appended to the
* destination URL; the return value should be used
* with a GET-redirect.
* If false, the verbatim destination URL is returned,
* which should be used with a FORM POST redirect.
* @see #wwwFormEncoding()
*/
public String getDestinationUrl(boolean httpGet) {
if (_destinationUrl == null) {
throw new IllegalStateException("Destination URL not set; " +
"is this a received message?");
}
if (httpGet) // append wwwFormEncoding to the destination URL
{
boolean hasQuery = _destinationUrl.indexOf("?") > 0;
String initialChar = hasQuery ? "&" : "?";
return _destinationUrl + initialChar + wwwFormEncoding();
} else // should send the keyValueFormEncoding in POST data
{
return _destinationUrl;
}
}
代码示例来源:origin: jbufu/openid4java
/**
* Gets the URL where the message should be sent, where applicable.
* Null for received messages.
*
* @param httpGet If true, the wwwFormEncoding() is appended to the
* destination URL; the return value should be used
* with a GET-redirect.
* If false, the verbatim destination URL is returned,
* which should be used with a FORM POST redirect.
*
* @see #wwwFormEncoding()
*/
public String getDestinationUrl(boolean httpGet)
{
if (_destinationUrl == null)
throw new IllegalStateException("Destination URL not set; " +
"is this a received message?");
if (httpGet) // append wwwFormEncoding to the destination URL
{
boolean hasQuery = _destinationUrl.indexOf("?") > 0;
String initialChar = hasQuery ? "&" : "?";
return _destinationUrl + initialChar + wwwFormEncoding();
}
else // should send the keyValueFormEncoding in POST data
return _destinationUrl;
}
内容来源于网络,如有侵权,请联系作者删除!