org.openid4java.discovery.yadis
Class YadisResolver

java.lang.Object
  extended by org.openid4java.discovery.yadis.YadisResolver

public class YadisResolver
extends java.lang.Object

Yadis discovery protocol implementation.

Yadis discovery protocol returns a Yadis Resource Descriptor (XRDS) document associated with a Yadis Identifier (YadisID)

YadisIDs can be any type of identifiers that are resolvable to a URL form, and in addition the URL form uses a HTTP or a HTTPS schema. Such an URL is defined by the Yadis speficification as a YadisURL. This functionality is implemented by the YadisURL helper class.

The discovery of the XRDS document is performed by the discover method on a YadisUrl.

Internal parameters used during the discovery process :

Author:
Marius Scurtescu, Johnny Bufu, Sutra Zhou

Field Summary
static java.lang.String YADIS_XRDS_LOCATION
           
 
Constructor Summary
YadisResolver(HttpFetcher httpFetcher)
           
YadisResolver(HttpFetcherFactory httpFetcherFactory)
           
 
Method Summary
 java.util.List discover(java.lang.String url)
          Performs Yadis discovery on the YadisURL.
 java.util.List discover(java.lang.String url, HttpFetcher httpFetcher)
          Performs Yadis discovery on the YadisURL.
 java.util.List discover(java.lang.String url, int maxRedirects)
          Performs Yadis discovery on the YadisURL.
 java.util.List discover(java.lang.String url, int maxRedirects, HttpFetcher httpFetcher)
          Performs Yadis discovery on the YadisURL.
 YadisResult discover(java.lang.String url, int maxRedirects, HttpFetcher httpFetcher, java.util.Set serviceTypes)
           
 YadisResult discover(java.lang.String url, int maxRedirects, java.util.Set serviceTypes)
           
 java.util.List discoverRP(java.lang.String url)
          Performs Relyin Party discovery on the supplied URL.
 HttpFetcher getHttpFetcher()
           
 int getMaxRedirects()
          Gets the internal limit configured for the maximum number of redirects to be followed for the HTTP calls.
 void setMaxRedirects(int maxRedirects)
          Sets the maximum number of redirects to be followed for the HTTP calls.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

YADIS_XRDS_LOCATION

public static final java.lang.String YADIS_XRDS_LOCATION
See Also:
Constant Field Values
Constructor Detail

YadisResolver

@Inject
public YadisResolver(HttpFetcherFactory httpFetcherFactory)

YadisResolver

public YadisResolver(HttpFetcher httpFetcher)
Method Detail

getMaxRedirects

public int getMaxRedirects()
Gets the internal limit configured for the maximum number of redirects to be followed for the HTTP calls.


setMaxRedirects

public void setMaxRedirects(int maxRedirects)
Sets the maximum number of redirects to be followed for the HTTP calls.


discoverRP

public java.util.List discoverRP(java.lang.String url)
                          throws DiscoveryException
Performs Relyin Party discovery on the supplied URL.

Parameters:
url - RP's realm or return_to URL
Returns:
List of DiscoveryInformation entries discovered from the RP's endpoints
Throws:
DiscoveryException

discover

public java.util.List discover(java.lang.String url)
                        throws DiscoveryException
Performs Yadis discovery on the YadisURL.

The maximum number of redirects that are followed is determined by the #_maxRedirects member field.

Parameters:
url - YadisURL on which discovery will be performed
Returns:
List of DiscoveryInformation entries discovered obtained from the URL Identifier.
Throws:
DiscoveryException
See Also:
#discover(String, int, HttpCache)

discover

public java.util.List discover(java.lang.String url,
                               HttpFetcher httpFetcher)
                        throws DiscoveryException
Performs Yadis discovery on the YadisURL.

The maximum number of redirects that are followed is determined by the #_maxRedirects member field.

Parameters:
url - YadisURL on which discovery will be performed
httpFetcher - HttpFetcher object to use for the call
Returns:
List of DiscoveryInformation entries discovered obtained from the URL Identifier.
Throws:
DiscoveryException
See Also:
#discover(String, int, HttpCache)

discover

public java.util.List discover(java.lang.String url,
                               int maxRedirects)
                        throws DiscoveryException
Performs Yadis discovery on the YadisURL.

Parameters:
url - YadisURL on which discovery will be performed
maxRedirects - The maximum number of redirects to be followed.
Returns:
List of DiscoveryInformation entries discovered obtained from the URL Identifier.
Throws:
DiscoveryException
See Also:
YadisResult

discover

public java.util.List discover(java.lang.String url,
                               int maxRedirects,
                               HttpFetcher httpFetcher)
                        throws DiscoveryException
Performs Yadis discovery on the YadisURL.

Parameters:
url - YadisURL on which discovery will be performed
maxRedirects - The maximum number of redirects to be followed.
httpFetcher - HttpFetcher object to use for the call.
Returns:
List of DiscoveryInformation entries discovered obtained from the URL Identifier.
Throws:
DiscoveryException
See Also:
YadisResult

discover

public YadisResult discover(java.lang.String url,
                            int maxRedirects,
                            java.util.Set serviceTypes)
                     throws DiscoveryException
Throws:
DiscoveryException

discover

public YadisResult discover(java.lang.String url,
                            int maxRedirects,
                            HttpFetcher httpFetcher,
                            java.util.Set serviceTypes)
                     throws DiscoveryException
Throws:
DiscoveryException

getHttpFetcher

public HttpFetcher getHttpFetcher()


Copyright © 2012 Sxip. All Rights Reserved.