Package io.revealbi.core.data
Class RVBearerTokenDataSourceCredential
java.lang.Object
io.revealbi.core.data.RVBearerTokenDataSourceCredential
- All Implemented Interfaces:
IRVDataSourceCredential
The class used to represent Bearer (aka 'Token') authentication.
-
Constructor Summary
ConstructorsConstructorDescriptionRVBearerTokenDataSourceCredential(String token, String userId) Creates credentials with the specified attributes. -
Method Summary
-
Constructor Details
-
RVBearerTokenDataSourceCredential
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
Returns the bearer token used for authentication.- Returns:
- The access token string.
-
getUserId
Returns the user ID associated with this credential.- Returns:
- A string that uniquely identifies the user.
-