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 the Credentials interface (which is passed to the CredentialsReceiver instance provided).

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method is called by the StreamLink library when it needs to cancel a request to get credentials.
    void
    Gets the credentials used to log in to the Liberator.
  • Method Details

    • 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.