public abstract class Token extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected TokenValidationExtraInfo |
extraInfo |
protected CertificateToken |
issuerToken
This attribute represents the
CertificateToken which is the issuer of the encapsulated Token. |
protected X500Principal |
issuerX500Principal
The normalized
X500Principal of the signer's certificate of this token. |
protected SignatureAlgorithm |
signatureAlgorithm |
protected String |
signatureInvalidityReason |
protected boolean |
signatureValid |
| Constructor and Description |
|---|
Token() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
TokenValidationExtraInfo |
extraInfo()
Returns the object managing the validation extra info.
|
String |
getAbbreviation()
This method returns the DSS abbreviation of the token.
|
byte[] |
getDigest(DigestAlgorithm digestAlgorithm)
Returns the digest value of the wrapped token
|
TokenIdentifier |
getDSSId()
Returns a DSS unique token identifier.
|
String |
getDSSIdAsString()
Returns a string representation of the unique DSS token identifier.
|
abstract byte[] |
getEncoded()
Returns the encoded form of the wrapped token.
|
CertificateToken |
getIssuerToken()
It returns the issuer certificate token that was used to sign this token (CertificateToken, CRLToken,
OCSPRespToken, TimestampToken).
|
X500Principal |
getIssuerX500Principal()
Returns the
X500Principal of the certificate which was used to sign this token. |
SignatureAlgorithm |
getSignatureAlgorithm()
Returns the algorithm that was used to sign the token (ex: SHA1WithRSAEncryption, SHA1withRSA...).
|
List<String> |
getValidationInfo()
Returns the additional information gathered during the validation process.
|
int |
hashCode() |
boolean |
isSelfSigned()
Checks if the certificate is self-signed.
|
boolean |
isSignatureValid()
Indicates if the token's signature is intact.
|
abstract boolean |
isSignedBy(CertificateToken issuerToken)
Checks if the token is signed by the token given in the parameter.
|
boolean |
isTrusted()
Checks if the certificate is provided by the trusted list.
|
String |
toString() |
abstract String |
toString(String indentStr)
returns a string representation of the token.
|
protected CertificateToken issuerToken
CertificateToken which is the issuer of the encapsulated Token. In other
words this is the CertificateToken used to sign the enclosed Token.protected X500Principal issuerX500Principal
X500Principal of the signer's certificate of this token.protected boolean signatureValid
protected String signatureInvalidityReason
protected SignatureAlgorithm signatureAlgorithm
protected TokenValidationExtraInfo extraInfo
public boolean isTrusted()
public boolean isSelfSigned()
public TokenIdentifier getDSSId()
public String getDSSIdAsString()
public X500Principal getIssuerX500Principal()
X500Principal of the certificate which was used to sign this token.public CertificateToken getIssuerToken()
public abstract boolean isSignedBy(CertificateToken issuerToken)
issuerToken - public List<String> getValidationInfo()
public String getAbbreviation()
public SignatureAlgorithm getSignatureAlgorithm()
public boolean isSignatureValid()
public TokenValidationExtraInfo extraInfo()
public abstract String toString(String indentStr)
indentStr - public abstract byte[] getEncoded()
public byte[] getDigest(DigestAlgorithm digestAlgorithm)
digestAlgorithm - the requested digest algorithmCopyright © 2018. All rights reserved.