List of usage examples for com.amazonaws SignableRequest getResourcePath
String getResourcePath();
From source file:com.ibm.og.s3.v2.AWSV2Auth.java
License:Open Source License
@Override public AuthenticatedRequest authenticate(final Request request) { checkNotNull(request);/*from ww w . j a va 2 s . c o m*/ final String accessKeyId = checkNotNull(request.getContext().get(Context.X_OG_USERNAME)); final String secretAccessKey = checkNotNull(request.getContext().get(Context.X_OG_PASSWORD)); final AWSCredentials credentials = new BasicAWSCredentials(accessKeyId, secretAccessKey); final AuthenticatedHttpRequest authenticatedRequest = new AuthenticatedHttpRequest(request); final SignableRequest<Request> signableRequest = new SignableRequestAdapter(authenticatedRequest); final S3Signer signer = new S3Signer(signableRequest.getHttpMethod().toString(), signableRequest.getResourcePath()); signer.sign(signableRequest, credentials); return authenticatedRequest; }