Class UsernamePasswordTokenProvider

java.lang.Object
com.datastax.astra.client.auth.UsernamePasswordTokenProvider
All Implemented Interfaces:
TokenProvider, Supplier<String>

public class UsernamePasswordTokenProvider extends Object implements TokenProvider
Creating a token with base64 encoded credentials.
Author:
Cedrick LUNVEN (@clunven)
  • Field Details

  • Constructor Details

    • UsernamePasswordTokenProvider

      public UsernamePasswordTokenProvider()
      Using defaults settings.
    • UsernamePasswordTokenProvider

      public UsernamePasswordTokenProvider(String username, String password)
      Full-fledged constructor.
      Parameters:
      username - username
      password - password
  • Method Details

    • getToken

      public String getToken()
      Generate or renew authentication token.
      Specified by:
      getToken in interface TokenProvider
      Returns:
      String