Interface CredentialsProvider
-
public interface CredentialsProvider
This interface defines how to provide the user credentials that StreamLink uses to log into a Liberator server.
If your StreamLink application does not use one of the implicit
CredentialProvider
implementations supplied with StreamLink, you must define your own class that implements this interface, along with an implementation of theCredentials
interface (which is passed to theCredentialsReceiver
instance provided).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancel()
This method is called by the StreamLink library when it needs to cancel a request to get credentials.void
onCredentialsRequired(CredentialsReceiver listener)
Gets the credentials used to log in to the Liberator.
-
-
-
Method Detail
-
onCredentialsRequired
void onCredentialsRequired(CredentialsReceiver listener)
Gets the credentials used to log in to the Liberator.
This method will be called by the StreamLink library to trigger an attempt to retrieve credentials.
This method should not block. If retrieving the credentials involves communicating with an external service then asynchronous methods should be used and control returned to the StreamLink library as quickly as possible.
- Parameters:
listener
- Interface to call back on that provides StreamLink with either the credentials or an error indication.
-
cancel
void cancel()
This method is called by the StreamLink library when it needs to cancel a request to get credentials.
-
-