public abstract class UrlSigner extends Object
This sign methods in this class are not called for a signature request unless that
request has already been allowed by the Authorizer
.
Implementations of this class need only generate the appropriate signed URL. However, more advanced implementations may do other work such as renaming objects to comply with naming rules for an S3 account.
Constructor and Description |
---|
UrlSigner(javax.servlet.ServletConfig servletConfig)
Constructs a UrlSigner with the following required properties from the servlet configuration:
|
Modifier and Type | Method and Description |
---|---|
protected Date |
calculateExpiryTime(int secondsUntilExpiry) |
abstract String |
signDelete(GatekeeperMessage requestMessage,
ClientInformation clientInformation,
SignatureRequest signatureRequest)
Generate a signed DELETE URL for the signature request.
|
abstract String |
signGet(GatekeeperMessage requestMessage,
ClientInformation clientInformation,
SignatureRequest signatureRequest)
Generate a signed GET URL for the signature request.
|
abstract String |
signGetAcl(GatekeeperMessage requestMessage,
ClientInformation clientInformation,
SignatureRequest signatureRequest)
Generate a signed GET URL for an ACL-based signature request.
|
abstract String |
signHead(GatekeeperMessage requestMessage,
ClientInformation clientInformation,
SignatureRequest signatureRequest)
Generate a signed HEAD URL for the signature request.
|
abstract String |
signPut(GatekeeperMessage requestMessage,
ClientInformation clientInformation,
SignatureRequest signatureRequest)
Generate a signed PUT URL for the signature request.
|
abstract String |
signPutAcl(GatekeeperMessage requestMessage,
ClientInformation clientInformation,
SignatureRequest signatureRequest)
Generate a signed PUT URL for an ACL-based signature request.
|
public UrlSigner(javax.servlet.ServletConfig servletConfig) throws javax.servlet.ServletException
servletConfig
- javax.servlet.ServletException
public abstract String signGet(GatekeeperMessage requestMessage, ClientInformation clientInformation, SignatureRequest signatureRequest) throws S3ServiceException
requestMessage
- the request message received from the client.clientInformation
- information about the client's end-point, and any Session or Principal associated with the client.signatureRequest
- a pre-approved signature request.S3ServiceException
public abstract String signHead(GatekeeperMessage requestMessage, ClientInformation clientInformation, SignatureRequest signatureRequest) throws S3ServiceException
requestMessage
- the request message received from the client.clientInformation
- information about the client's end-point, and any Session or Principal associated with the client.signatureRequest
- a pre-approved signature request.S3ServiceException
public abstract String signPut(GatekeeperMessage requestMessage, ClientInformation clientInformation, SignatureRequest signatureRequest) throws S3ServiceException
requestMessage
- the request message received from the client.clientInformation
- information about the client's end-point, and any Session or Principal associated with the client.signatureRequest
- a pre-approved signature request.S3ServiceException
public abstract String signDelete(GatekeeperMessage requestMessage, ClientInformation clientInformation, SignatureRequest signatureRequest) throws S3ServiceException
requestMessage
- the request message received from the client.clientInformation
- information about the client's end-point, and any Session or Principal associated with the client.signatureRequest
- a pre-approved signature request.S3ServiceException
public abstract String signGetAcl(GatekeeperMessage requestMessage, ClientInformation clientInformation, SignatureRequest signatureRequest) throws S3ServiceException
requestMessage
- the request message received from the client.clientInformation
- information about the client's end-point, and any Session or Principal associated with the client.signatureRequest
- a pre-approved signature request.S3ServiceException
public abstract String signPutAcl(GatekeeperMessage requestMessage, ClientInformation clientInformation, SignatureRequest signatureRequest) throws S3ServiceException
requestMessage
- the request message received from the client.clientInformation
- information about the client's end-point, and any Session or Principal associated with the client.signatureRequest
- a pre-approved signature request.S3ServiceException
protected Date calculateExpiryTime(int secondsUntilExpiry)
Copyright © 2006–2018. All rights reserved.