Class RVBearerTokenDataSourceCredential

java.lang.Object
io.revealbi.core.data.RVBearerTokenDataSourceCredential
All Implemented Interfaces:
IRVDataSourceCredential

public class RVBearerTokenDataSourceCredential extends Object implements IRVDataSourceCredential
The class used to represent Bearer (aka 'Token') authentication.
  • Constructor Details

    • RVBearerTokenDataSourceCredential

      public RVBearerTokenDataSourceCredential(String token, String userId)
      Creates credentials with the specified attributes.
      Parameters:
      token - Required. This is usually the access token resulting from an OAuth authentication process. The provided token is expected to be valid (not expired). If the caller's available token is expired or is about to expire, it is the caller's responsibility to perform a OAuth refresh request in order to get a fresh access token to use as a parameter for this constructor.
      userId - Required. A string that uniquely identifies the user associated with this credentials.
  • Method Details

    • getToken

      public String getToken()
      Returns the bearer token used for authentication.
      Returns:
      The access token string.
    • getUserId

      public String getUserId()
      Returns the user ID associated with this credential.
      Returns:
      A string that uniquely identifies the user.