Interface TokenProvider

  • All Implemented Interfaces:

    
    public interface TokenProvider
    
                        

    Provides a token used to authenticate the user with Stream Chat API. The SDK doesn't refresh the token internally and will call loadToken function once the previous one has expired.

    Check out docs for more info about tokens.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract String loadToken() Loads the token for the current user.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • loadToken

        @WorkerThread() abstract String loadToken()

        Loads the token for the current user. The token will be loaded only if the token was not loaded yet or existing one has expired. If the token cannot be loaded, returns an empty string and never throws an exception.

        Returns:

        The valid JWT token.