Package com.volcengine.sign
Class VolcstackSign
- java.lang.Object
-
- com.volcengine.sign.VolcstackSign
-
- All Implemented Interfaces:
Authentication
public class VolcstackSign extends Object implements Authentication
[email protected] 2022/3/18 13:13
-
-
Constructor Summary
Constructors Constructor Description VolcstackSign()VolcstackSign(Credentials credentials)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyToParams(List<Pair> queryParams, Map<String,String> headerParams, String payload)Apply authentication settings to header and query params.VolcstackSigncopy()CredentialsgetCredentials()StringgetMethod()StringgetRegion()StringgetService()Map<String,String>presign(Map<String,String> queryParams)Generate presigned URL query parameters (without host signing)Map<String,String>presign(Map<String,String> queryParams, String host)Generate presigned URL query parametersvoidsetCredentials(Credentials credentials)voidsetMethod(String method)voidsetRegion(String region)voidsetService(String service)
-
-
-
Constructor Detail
-
VolcstackSign
public VolcstackSign()
-
VolcstackSign
public VolcstackSign(Credentials credentials)
-
-
Method Detail
-
applyToParams
public void applyToParams(List<Pair> queryParams, Map<String,String> headerParams, String payload)
Description copied from interface:AuthenticationApply authentication settings to header and query params.- Specified by:
applyToParamsin interfaceAuthentication- Parameters:
queryParams- List of query parametersheaderParams- Map of header parameters
-
getCredentials
public Credentials getCredentials()
-
setCredentials
public void setCredentials(Credentials credentials)
-
getRegion
public String getRegion()
-
setRegion
public void setRegion(String region)
-
getService
public String getService()
-
setService
public void setService(String service)
-
getMethod
public String getMethod()
-
setMethod
public void setMethod(String method)
-
copy
public VolcstackSign copy()
-
presign
public Map<String,String> presign(Map<String,String> queryParams) throws Exception
Generate presigned URL query parameters (without host signing)- Parameters:
queryParams- Original query parameters- Returns:
- Complete query parameters Map containing all signature information
- Throws:
Exception
-
presign
public Map<String,String> presign(Map<String,String> queryParams, String host) throws Exception
Generate presigned URL query parameters- Parameters:
queryParams- Original query parametershost- Host header value to include in signing (e.g., "rds-mysql.cn-beijing.volcengineapi.com"). If null or empty, no host header is signed.- Returns:
- Complete query parameters Map containing all signature information
- Throws:
Exception
-
-