Package io.minio
Class Signer
java.lang.Object
io.minio.Signer
Amazon AWS S3 signature V4 signer.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringcredential(String accessKey, ZonedDateTime date, String region) Returns credential string of given access key, date and region.static StringgetChunkSignature(String chunkSha256, ZonedDateTime date, String region, String secretKey, String prevSignature) Returns chunk signature calculated using given arguments.static StringpostPresignV4(String stringToSign, String secretKey, ZonedDateTime date, String region) Returns pre-signed post policy string for given stringToSign, secret key, date and region.static okhttp3.HttpUrlReturns pre-signed HttpUrl object for given request, region, access key, secret key and expires time.static okhttp3.RequestsignV4S3(okhttp3.Request request, String region, String accessKey, String secretKey, String contentSha256) Returns signed request of given request for S3 service.static okhttp3.RequestsignV4Sts(okhttp3.Request request, String region, String accessKey, String secretKey, String contentSha256) Returns signed request of given request for STS service.static byte[]sumHmac(byte[] key, byte[] data) Returns HMacSHA256 digest of given key and data.
-
Method Details
-
getChunkSignature
public static String getChunkSignature(String chunkSha256, ZonedDateTime date, String region, String secretKey, String prevSignature) throws MinioException Returns chunk signature calculated using given arguments.- Throws:
MinioException
-
signV4S3
public static okhttp3.Request signV4S3(okhttp3.Request request, String region, String accessKey, String secretKey, String contentSha256) throws MinioException Returns signed request of given request for S3 service.- Throws:
MinioException
-
signV4Sts
public static okhttp3.Request signV4Sts(okhttp3.Request request, String region, String accessKey, String secretKey, String contentSha256) throws MinioException Returns signed request of given request for STS service.- Throws:
MinioException
-
presignV4
public static okhttp3.HttpUrl presignV4(okhttp3.Request request, String region, String accessKey, String secretKey, int expires) throws MinioException Returns pre-signed HttpUrl object for given request, region, access key, secret key and expires time.- Throws:
MinioException
-
credential
Returns credential string of given access key, date and region. -
postPresignV4
public static String postPresignV4(String stringToSign, String secretKey, ZonedDateTime date, String region) throws MinioException Returns pre-signed post policy string for given stringToSign, secret key, date and region.- Throws:
MinioException
-
sumHmac
Returns HMacSHA256 digest of given key and data.- Throws:
MinioException
-