|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.baidubce.auth.SignOptions
public class SignOptions
Options for signing the request.
There are 3 options available:
Option | Description |
---|---|
headersToSign | The set of headers to be signed. If this option is not set or set to null, only the following headers are signed
|
timestamp | The time when the signature was created. If this option is not set or set to null, the signer will use the time when the sign method is invoked. |
expirationInSeconds | The time until the signature will expire, which starts from the timestamp. By default, it is set to 1800 (half an hour). |
Field Summary | |
---|---|
static SignOptions |
DEFAULT
The default sign options, which is {headersToSign:null, timestamp:null, expirationInSeconds:1800}. |
static int |
DEFAULT_EXPIRATION_IN_SECONDS
|
static int |
DEFAULT_MAX_EXPIRATION_IN_SECONDS
Deprecated. |
static int |
DEFAULT_MIN_EXPIRATION_IN_SECONDS
Deprecated. |
Constructor Summary | |
---|---|
SignOptions()
|
Method Summary | |
---|---|
int |
getExpirationInSeconds()
Returns the time until the signature will expire. |
Set<String> |
getHeadersToSign()
Returns the set of headers to be signed. |
Date |
getTimestamp()
Returns the time when the signature was created. |
void |
setExpirationInSeconds(int expirationInSeconds)
Sets the time until the signature will expire. |
void |
setHeadersToSign(Set<String> headersToSign)
Sets the set of headers to be signed. |
void |
setTimestamp(Date timestamp)
Sets the time when the signature was created. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final SignOptions DEFAULT
public static final int DEFAULT_EXPIRATION_IN_SECONDS
@Deprecated public static final int DEFAULT_MIN_EXPIRATION_IN_SECONDS
@Deprecated public static final int DEFAULT_MAX_EXPIRATION_IN_SECONDS
Constructor Detail |
---|
public SignOptions()
Method Detail |
---|
public Set<String> getHeadersToSign()
public void setHeadersToSign(Set<String> headersToSign)
headersToSign
- the set of headers to be signed.public Date getTimestamp()
public void setTimestamp(Date timestamp)
timestamp
- the time when the signature was created.public int getExpirationInSeconds()
public void setExpirationInSeconds(int expirationInSeconds)
expirationInSeconds
- The time until the signature will expire.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |