com.avos.avoscloud.Signature Maven / Gradle / Ivy
The newest version!
package com.avos.avoscloud;
import com.alibaba.fastjson.annotation.JSONType;
import java.util.Collections;
import java.util.List;
/**
* Created by nsun on 5/15/14.
*/
@JSONType(ignores = {"expired"})
public class Signature {
private String signature;
private long timestamp;
private String nonce;
private List signedPeerIds;
@Deprecated
public List getSignedPeerIds() {
if (signedPeerIds == null) {
signedPeerIds = Collections.emptyList();
}
return signedPeerIds;
}
@Deprecated
public void setSignedPeerIds(List signedPeerIds) {
this.signedPeerIds = signedPeerIds;
}
public String getSignature() {
return signature;
}
public void setSignature(String signature) {
this.signature = signature;
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public String getNonce() {
return nonce;
}
public void setNonce(String nonce) {
this.nonce = nonce;
}
protected boolean isExpired() {
return timestamp + 14400 < (System.currentTimeMillis() / 1000);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy