public abstract class UrlSigner
extends java.lang.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 java.util.Date |
calculateExpiryTime(int secondsUntilExpiry) |
abstract java.lang.String |
signDelete(GatekeeperMessage requestMessage,
ClientInformation clientInformation,
SignatureRequest signatureRequest)
Generate a signed DELETE URL for the signature request.
|
abstract java.lang.String |
signGet(GatekeeperMessage requestMessage,
ClientInformation clientInformation,
SignatureRequest signatureRequest)
Generate a signed GET URL for the signature request.
|
abstract java.lang.String |
signGetAcl(GatekeeperMessage requestMessage,
ClientInformation clientInformation,
SignatureRequest signatureRequest)
Generate a signed GET URL for an ACL-based signature request.
|
abstract java.lang.String |
signHead(GatekeeperMessage requestMessage,
ClientInformation clientInformation,
SignatureRequest signatureRequest)
Generate a signed HEAD URL for the signature request.
|
abstract java.lang.String |
signPut(GatekeeperMessage requestMessage,
ClientInformation clientInformation,
SignatureRequest signatureRequest)
Generate a signed PUT URL for the signature request.
|
abstract java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.util.Date calculateExpiryTime(int secondsUntilExpiry)