com.coinbase.cdp.auth
JwtGenerator and WalletJwtGenerator to provide a simplified, unified API.
Example usage:
Constructor Details
CdpTokenGenerator
Overload 1
apiKeyId (String) - the API key ID
apiKeySecret (String) - the API key secret (PEM EC key or base64 Ed25519 key)
walletSecret (Optional<String>) - optional wallet secret for wallet auth tokens
Overload 2
apiKeyId (String) - the API key ID
apiKeySecret (String) - the API key secret (PEM EC key or base64 Ed25519 key)
walletSecret (Optional<String>) - optional wallet secret for wallet auth tokens
expiresIn (long) - JWT expiration time in seconds
Method Details
generateTokens
request (CdpTokenRequest) - the token request configuration
Returns:
CdpTokenResponse - the generated tokens
Throws:
[WalletSecretException](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/auth/exceptions/WalletSecretException "class in com.coinbase.cdp.auth.exceptions") - if wallet auth is requested but no wallet secret is configured
generateBearerToken
method (String) - the HTTP method
host (String) - the request host
path (String) - the request path
Returns:
String - the bearer token
hasWalletSecret
boolean - true if wallet secret is available