com.coinbase.cdp.auth
includeWalletAuthToken was set to true in the request.
This class implements TokenProvider and can be used wherever token providers are accepted, such as in CDP client factory methods.
Example usage:
Constructor Details
CdpTokenResponse
[IllegalArgumentException](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html "class or interface in java.lang") - if validation fails
Parameters:
bearerToken - String
walletAuthToken - Optional<String>
Method Details
bearerOnly
bearerToken (String) - the bearer token
Returns:
CdpTokenResponse - the token response
withWalletAuth
bearerToken (String) - the bearer token
walletAuthToken (String) - the wallet auth token
Returns:
CdpTokenResponse - the token response
toString
[toString](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Record.html#toString\(\) "class or interface in java.lang") in class [Record](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Record.html "class or interface in java.lang")
Returns:
String - a string representation of this object
hashCode
[hashCode](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Record.html#hashCode\(\) "class or interface in java.lang") in class [Record](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Record.html "class or interface in java.lang")
Returns:
int - a hash code value for this object
equals
Objects::equals(Object,Object).
Specified by:
[equals](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Record.html#equals\(java.lang.Object\) "class or interface in java.lang") in class [Record](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Record.html "class or interface in java.lang")
Parameters:
o (Object) - the object with which to compare
Returns:
boolean - true if this object is the same as the o argument; false otherwise.
bearerToken
bearerToken record component.
Specified by:
[bearerToken](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/auth/TokenProvider) in interface [TokenProvider](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/auth/TokenProvider "interface in com.coinbase.cdp.auth")
Returns:
String - the value of the bearerToken record component
walletAuthToken
walletAuthToken record component.
Specified by:
[walletAuthToken](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/auth/TokenProvider) in interface [TokenProvider](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/auth/TokenProvider "interface in com.coinbase.cdp.auth")
Returns:
Optional<String> - the value of the walletAuthToken record component