Package com.biglybt.pif.tracker.web
Class TrackerAuthenticationAdapter
- java.lang.Object
-
- com.biglybt.pif.tracker.web.TrackerAuthenticationAdapter
-
- All Implemented Interfaces:
TrackerAuthenticationListener
public class TrackerAuthenticationAdapter extends java.lang.Object implements TrackerAuthenticationListener
-
-
Constructor Summary
Constructors Constructor Description TrackerAuthenticationAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
authenticate(java.lang.String headers, java.net.URL resource, java.lang.String user, java.lang.String password)
Hack to support header-based auth - not included in listener for compatibility reasonsbyte[]
authenticate(java.net.URL resource, java.lang.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 checksboolean
authenticate(java.net.URL resource, java.lang.String user, java.lang.String password)
authentica a given user/password pair for access to the given resource
-
-
-
Method Detail
-
authenticate
public boolean authenticate(java.net.URL resource, java.lang.String user, java.lang.String password)
Description copied from interface:TrackerAuthenticationListener
authentica a given user/password pair for access to the given resource- Specified by:
authenticate
in interfaceTrackerAuthenticationListener
- Returns:
- true - access OK, false access denied
-
authenticate
public boolean authenticate(java.lang.String headers, java.net.URL resource, java.lang.String user, java.lang.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(java.net.URL resource, java.lang.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 interfaceTrackerAuthenticationListener
- Returns:
- SHA1 password hash or null if either user unknown of user can't access the resource
-
-