本文整理了Java中org.openid4java.discovery.yadis.YadisUrl
类的一些代码示例,展示了YadisUrl
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YadisUrl
类的具体详情如下:
包路径:org.openid4java.discovery.yadis.YadisUrl
类名称:YadisUrl
[英]Wrapper class for various identifiers that are resolvable to URLs and can be used as YadisURLs with the Yadis protocol.
[中]用于各种标识符的包装器类,这些标识符可解析为URL,并可用作Yadis协议中的Yadisurl。
代码示例来源:origin: com.cloudbees/openid4java-shaded
/**
* Contructs a YadisURL from a string;
* assumes the string to be a URL-type identifier
*
* @param urlString URL-type identifier in string format
* @throws YadisException if the provided string cannot be a YadisUrl
*/
public YadisUrl(String urlString) throws YadisException
{
this(urlFromString(urlString));
if (! isValid(this._yadisUrl))
throw new YadisException(
"The scheme name of a Yadis URL must be 'http' or 'https'",
OpenIDException.YADIS_INVALID_SCHEME);
}
代码示例来源:origin: org.wso2.org.openid4java/openid4java-nodeps
/**
* Constructs a YadisURL from an XRI identifier.
*
* @param xriId The XRI identifier
*/
public YadisUrl(XriIdentifier xriId) throws YadisException {
this(urlFromString(xriId.toURINormalForm()));
}
代码示例来源:origin: org.wso2.org.openid4java/openid4java-nodeps
/**
* Constructs a YadisURL from a URL object;
* insures the schema is HTTP or HTTPS
*
* @param urlId URL identifier
* @throws YadisException tf the URL identifier is not a valid YadisURL
*/
public YadisUrl(URL urlId) throws YadisException {
if (isValid(urlId)) {
_yadisUrl = urlId;
} else {
throw new YadisException(
"The scheme name of a Yadis URL must be 'http' or 'https'",
OpenIDException.YADIS_INVALID_SCHEME);
}
}
代码示例来源:origin: org.openid4java/openid4java-nodeps
public YadisResult discover(String url, int maxRedirects, HttpFetcher httpFetcher, Set serviceTypes)
throws DiscoveryException
{
YadisUrl yadisUrl = new YadisUrl(url);
// try to retrieve the Yadis Descriptor URL with a HEAD call first
YadisResult result = retrieveXrdsLocation(yadisUrl, false, maxRedirects, serviceTypes);
// try GET
if (result.getXrdsLocation() == null)
result = retrieveXrdsLocation(yadisUrl, true, maxRedirects, serviceTypes);
if (result.getXrdsLocation() != null)
{
retrieveXrdsDocument(result, maxRedirects, serviceTypes);
}
else if (result.hasEndpoints())
{
// report the yadis url as the xrds location
result.setXrdsLocation(url, OpenIDException.YADIS_INVALID_URL);
}
_log.info("Yadis discovered " + result.getEndpointCount() + " endpoints from: " + url);
return result;
}
代码示例来源:origin: org.openid4java/openid4java
_httpFetcher.get(url.getUrl().toString(), requestOptions) :
_httpFetcher.head(url.getUrl().toString(), requestOptions);
" using HEAD from " + url.getUrl().toString() +
"; status=" + resp.getStatusCode());
代码示例来源:origin: jbufu/openid4java
/**
* Constructs a YadisURL from an XRI identifier.
*
* @param xriId The XRI identifier
*/
public YadisUrl(XriIdentifier xriId) throws YadisException
{
this(urlFromString(xriId.toURINormalForm()));
}
代码示例来源:origin: org.openid4java/openid4java
/**
* Constructs a YadisURL from a URL object;
* insures the schema is HTTP or HTTPS
*
* @param urlId URL identifier
* @throws YadisException tf the URL identifier is not a valid YadisURL
*/
public YadisUrl(URL urlId) throws YadisException
{
if (isValid(urlId))
_yadisUrl = urlId;
else
throw new YadisException(
"The scheme name of a Yadis URL must be 'http' or 'https'",
OpenIDException.YADIS_INVALID_SCHEME);
}
代码示例来源:origin: com.cloudbees/openid4java-shaded
public YadisResult discover(String url, int maxRedirects, HttpFetcher httpFetcher, Set serviceTypes)
throws DiscoveryException
{
YadisUrl yadisUrl = new YadisUrl(url);
// try to retrieve the Yadis Descriptor URL with a HEAD call first
YadisResult result = retrieveXrdsLocation(yadisUrl, false, maxRedirects, serviceTypes);
// try GET
if (result.getXrdsLocation() == null)
result = retrieveXrdsLocation(yadisUrl, true, maxRedirects, serviceTypes);
if (result.getXrdsLocation() != null)
{
retrieveXrdsDocument(result, maxRedirects, serviceTypes);
}
else if (result.hasEndpoints())
{
// report the yadis url as the xrds location
result.setXrdsLocation(url, OpenIDException.YADIS_INVALID_URL);
}
_log.info("Yadis discovered " + result.getEndpointCount() + " endpoints from: " + url);
return result;
}
代码示例来源:origin: jbufu/openid4java
_httpFetcher.get(url.getUrl().toString(), requestOptions) :
_httpFetcher.head(url.getUrl().toString(), requestOptions);
" using HEAD from " + url.getUrl().toString() +
"; status=" + resp.getStatusCode());
代码示例来源:origin: org.openid4java/openid4java
/**
* Contructs a YadisURL from a string;
* assumes the string to be a URL-type identifier
*
* @param urlString URL-type identifier in string format
* @throws YadisException if the provided string cannot be a YadisUrl
*/
public YadisUrl(String urlString) throws YadisException
{
this(urlFromString(urlString));
if (! isValid(this._yadisUrl))
throw new YadisException(
"The scheme name of a Yadis URL must be 'http' or 'https'",
OpenIDException.YADIS_INVALID_SCHEME);
}
代码示例来源:origin: org.openid4java/openid4java
/**
* Constructs a YadisURL from an XRI identifier.
*
* @param xriId The XRI identifier
*/
public YadisUrl(XriIdentifier xriId) throws YadisException
{
this(urlFromString(xriId.toURINormalForm()));
}
代码示例来源:origin: org.openid4java/openid4java-nodeps
/**
* Constructs a YadisURL from a URL object;
* insures the schema is HTTP or HTTPS
*
* @param urlId URL identifier
* @throws YadisException tf the URL identifier is not a valid YadisURL
*/
public YadisUrl(URL urlId) throws YadisException
{
if (isValid(urlId))
_yadisUrl = urlId;
else
throw new YadisException(
"The scheme name of a Yadis URL must be 'http' or 'https'",
OpenIDException.YADIS_INVALID_SCHEME);
}
代码示例来源:origin: org.wso2.org.openid4java/openid4java-nodeps
public YadisResult discover(String url, int maxRedirects, HttpFetcher httpFetcher, Set serviceTypes)
throws DiscoveryException {
YadisUrl yadisUrl = new YadisUrl(url);
// try to retrieve the Yadis Descriptor URL with a HEAD call first
YadisResult result = retrieveXrdsLocation(yadisUrl, false, maxRedirects, serviceTypes);
// try GET
if (result.getXrdsLocation() == null) {
result = retrieveXrdsLocation(yadisUrl, true, maxRedirects, serviceTypes);
}
if (result.getXrdsLocation() != null) {
retrieveXrdsDocument(result, maxRedirects, serviceTypes);
} else if (result.hasEndpoints()) {
// report the yadis url as the xrds location
result.setXrdsLocation(url, OpenIDException.YADIS_INVALID_URL);
}
_log.info("Yadis discovered " + result.getEndpointCount() + " endpoints from: " + url);
return result;
}
代码示例来源:origin: org.wso2.org.openid4java/openid4java-nodeps
_httpFetcher.get(url.getUrl().toString(), requestOptions) :
_httpFetcher.head(url.getUrl().toString(), requestOptions);
" using HEAD from " + url.getUrl().toString() +
"; status=" + resp.getStatusCode());
代码示例来源:origin: jbufu/openid4java
/**
* Contructs a YadisURL from a string;
* assumes the string to be a URL-type identifier
*
* @param urlString URL-type identifier in string format
* @throws YadisException if the provided string cannot be a YadisUrl
*/
public YadisUrl(String urlString) throws YadisException
{
this(urlFromString(urlString));
if (! isValid(this._yadisUrl))
throw new YadisException(
"The scheme name of a Yadis URL must be 'http' or 'https'",
OpenIDException.YADIS_INVALID_SCHEME);
}
代码示例来源:origin: org.openid4java/openid4java-nodeps
/**
* Constructs a YadisURL from an XRI identifier.
*
* @param xriId The XRI identifier
*/
public YadisUrl(XriIdentifier xriId) throws YadisException
{
this(urlFromString(xriId.toURINormalForm()));
}
代码示例来源:origin: jbufu/openid4java
/**
* Constructs a YadisURL from a URL object;
* insures the schema is HTTP or HTTPS
*
* @param urlId URL identifier
* @throws YadisException tf the URL identifier is not a valid YadisURL
*/
public YadisUrl(URL urlId) throws YadisException
{
if (isValid(urlId))
_yadisUrl = urlId;
else
throw new YadisException(
"The scheme name of a Yadis URL must be 'http' or 'https'",
OpenIDException.YADIS_INVALID_SCHEME);
}
代码示例来源:origin: jbufu/openid4java
public YadisResult discover(String url, int maxRedirects, HttpFetcher httpFetcher, Set serviceTypes)
throws DiscoveryException
{
YadisUrl yadisUrl = new YadisUrl(url);
// try to retrieve the Yadis Descriptor URL with a HEAD call first
YadisResult result = retrieveXrdsLocation(yadisUrl, false, maxRedirects, serviceTypes);
// try GET
if (result.getXrdsLocation() == null)
result = retrieveXrdsLocation(yadisUrl, true, maxRedirects, serviceTypes);
if (result.getXrdsLocation() != null)
{
retrieveXrdsDocument(result, maxRedirects, serviceTypes);
}
else if (result.hasEndpoints())
{
// report the yadis url as the xrds location
result.setXrdsLocation(url, OpenIDException.YADIS_INVALID_URL);
}
_log.info("Yadis discovered " + result.getEndpointCount() + " endpoints from: " + url);
return result;
}
代码示例来源:origin: org.openid4java/openid4java-nodeps
_httpFetcher.get(url.getUrl().toString(), requestOptions) :
_httpFetcher.head(url.getUrl().toString(), requestOptions);
" using HEAD from " + url.getUrl().toString() +
"; status=" + resp.getStatusCode());
代码示例来源:origin: org.openid4java/openid4java-nodeps
/**
* Contructs a YadisURL from a string;
* assumes the string to be a URL-type identifier
*
* @param urlString URL-type identifier in string format
* @throws YadisException if the provided string cannot be a YadisUrl
*/
public YadisUrl(String urlString) throws YadisException
{
this(urlFromString(urlString));
if (! isValid(this._yadisUrl))
throw new YadisException(
"The scheme name of a Yadis URL must be 'http' or 'https'",
OpenIDException.YADIS_INVALID_SCHEME);
}
内容来源于网络,如有侵权,请联系作者删除!