Package overit.geocall.aws.auth.client
Class AWSRestClientAuthStrategy
java.lang.Object
overit.geocall.aws.auth.client.AWSRestClientAuthStrategy
- All Implemented Interfaces:
overit.geocall.spring.auth.client.AuthenticationInterceptor.Strategy
public class AWSRestClientAuthStrategy
extends Object
implements overit.geocall.spring.auth.client.AuthenticationInterceptor.Strategy
AWSRestClientAuthStrategy is a class that implements the Strategy interface of RestClientAuthenticator.
It provides authentication functionality for AWS services by adding the necessary headers to the request
following the AWS Signature Version 4 specifications.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAWSRestClientAuthStrategy(String serviceType, String accessKeyId, String secretAccessKey, String region) Constructor for AWSAuthStrategy for AWS credentials.AWSRestClientAuthStrategy(String serviceType, String accessKeyId, String secretAccessKey, String secretToken, String region) Constructor for AWSAuthStrategy for AWS credentials. -
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticate(org.springframework.http.HttpRequest request, byte[] body)
-
Field Details
-
X_AMZ_SECURITY_TOKEN
- See Also:
-
X_AMZ_DATE
- See Also:
-
-
Constructor Details
-
AWSRestClientAuthStrategy
public AWSRestClientAuthStrategy(String serviceType, String accessKeyId, String secretAccessKey, String region) Constructor for AWSAuthStrategy for AWS credentials. -
AWSRestClientAuthStrategy
public AWSRestClientAuthStrategy(String serviceType, String accessKeyId, String secretAccessKey, String secretToken, String region) Constructor for AWSAuthStrategy for AWS credentials.- Parameters:
serviceType- aws service type you need to authenticate to.accessKeyId-Stringabout the access key ID.secretAccessKey-Stringabout the secret access key.secretToken-Stringabout the secret token.region- specify this if the service you are calling is in different region than caller
-
-
Method Details
-
authenticate
public void authenticate(org.springframework.http.HttpRequest request, byte[] body)
-