org.gudy.azureus2.plugins.tracker.web
Class TrackerAuthenticationAdapter

java.lang.Object
  extended by org.gudy.azureus2.plugins.tracker.web.TrackerAuthenticationAdapter
All Implemented Interfaces:
TrackerAuthenticationListener

public class TrackerAuthenticationAdapter
extends Object
implements TrackerAuthenticationListener

Author:
parg

Constructor Summary
TrackerAuthenticationAdapter()
           
 
Method Summary
 boolean authenticate(String headers, URL resource, String user, String password)
          Hack to support header-based auth - not included in listener for compatibility reasons
 byte[] authenticate(URL resource, String user)
          For the UDP tracker protocol it is necessary to return the SHA1 hash of the password for the user, allowing the core to perform the necessary checks
 boolean authenticate(URL resource, String user, String password)
          authentica a given user/password pair for access to the given resource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrackerAuthenticationAdapter

public TrackerAuthenticationAdapter()
Method Detail

authenticate

public boolean authenticate(URL resource,
                            String user,
                            String password)
Description copied from interface: TrackerAuthenticationListener
authentica a given user/password pair for access to the given resource

Specified by:
authenticate in interface TrackerAuthenticationListener
Returns:
true - access OK, false access denied

authenticate

public boolean authenticate(String headers,
                            URL resource,
                            String user,
                            String password)
Hack to support header-based auth - not included in listener for compatibility reasons

Parameters:
headers -
resource -
user -
password -
Returns:

authenticate

public byte[] authenticate(URL resource,
                           String user)
Description copied from interface: TrackerAuthenticationListener
For the UDP tracker protocol it is necessary to return the SHA1 hash of the password for the user, allowing the core to perform the necessary checks

Specified by:
authenticate in interface TrackerAuthenticationListener
Returns:
SHA1 password hash or null if either user unknown of user can't access the resource