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