Class RequestSignerImpl
- java.lang.Object
-
- com.oracle.bmc.http.signing.internal.RequestSignerImpl
-
- All Implemented Interfaces:
RequestSigner
public class RequestSignerImpl extends Object implements RequestSigner
Implementation of the RequestSigner interfaceThis contains the main code that is used for signing a request
Class is immutable. @Immutable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRequestSignerImpl.SigningConfigurationBasic configuration of what headers to sign.
-
Constructor Summary
Constructors Constructor Description RequestSignerImpl(KeySupplier<RSAPrivateKey> keySupplier, RequestSignerImpl.SigningConfiguration signingConfiguration, Supplier<String> keyIdSupplier)Construct the RequestSigner with the specified KeySupplier.RequestSignerImpl(KeySupplier<RSAPrivateKey> keySupplier, SigningStrategy signingStrategy, Supplier<String> keyIdSupplier)Construct the RequestSigner with the specified KeySupplier.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Map<String,String>signRequest(Algorithm algorithm, URI uri, String httpMethod, Map<String,List<String>> headers, Object body, String versionName, String keyId, KeySupplier<RSAPrivateKey> keySupplier, RequestSignerImpl.SigningConfiguration signingConfiguration)Map<String,String>signRequest(URI uri, String httpMethod, Map<String,List<String>> headers, Object body)Sign a request.
-
-
-
Constructor Detail
-
RequestSignerImpl
public RequestSignerImpl(@Nonnull KeySupplier<RSAPrivateKey> keySupplier, @Nonnull SigningStrategy signingStrategy, @Nonnull Supplier<String> keyIdSupplier)Construct the RequestSigner with the specified KeySupplier.This will be used to get keys for doing the signing.
- Parameters:
keySupplier- A key supplier that will be used for signing the requestsigningStrategy- The signing strategy to determine what headers to usekeyIdSupplier- A keyId supplier that will be used for signing the request
-
RequestSignerImpl
public RequestSignerImpl(@Nonnull KeySupplier<RSAPrivateKey> keySupplier, @Nonnull RequestSignerImpl.SigningConfiguration signingConfiguration, @Nonnull Supplier<String> keyIdSupplier)Construct the RequestSigner with the specified KeySupplier.This will be used to get keys for doing the signing.
- Parameters:
keySupplier- A key supplier that will be used for signing the requestsigningConfiguration- The signing configuration to determine what headers to usekeyIdSupplier- A keyId supplier that will be used for signing the request
-
-
Method Detail
-
signRequest
public Map<String,String> signRequest(@Nonnull URI uri, @Nonnull String httpMethod, @Nonnull Map<String,List<String>> headers, @Nullable Object body)
Description copied from interface:RequestSignerSign a request.- Specified by:
signRequestin interfaceRequestSigner- Parameters:
uri- the request urihttpMethod- the request methodheaders- the request headersbody- the request body (if this is a PUT or POST method)- Returns:
- a map that contains the signature
Authorizationheader, and any headers that were signed when generating the signature. You MUST include the exact values of the returned headers when making requests.
-
-