Interface RestSignatureTokenConnection

All Superinterfaces:
Serializable

@Path("/") @Produces("application/json") @Consumes("application/json") public interface RestSignatureTokenConnection extends Serializable
The server signing service for REST webService
  • Method Summary

    Modifier and Type
    Method
    Description
    eu.europa.esig.dss.ws.server.signing.dto.RemoteKeyEntry
    getKey(String alias)
    Retrieves a key by its alias
    List<eu.europa.esig.dss.ws.server.signing.dto.RemoteKeyEntry>
    Retrieves all the available keys (private keys entries) from the token.
    eu.europa.esig.dss.ws.dto.SignatureValueDTO
    sign(eu.europa.esig.dss.ws.dto.ToBeSignedDTO toBeSigned, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, String alias)
    This method signs the toBeSigned data with the digest digestAlgorithm and the given alias.
    eu.europa.esig.dss.ws.dto.SignatureValueDTO
    sign(eu.europa.esig.dss.ws.dto.ToBeSignedDTO toBeSigned, eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, String alias)
    This method signs the toBeSigned data with the digest digestAlgorithm and the given alias.
    eu.europa.esig.dss.ws.dto.SignatureValueDTO
    signDigest(eu.europa.esig.dss.ws.dto.DigestDTO digest, eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, String alias)
    This method signs the digest data with a mask mgf and the given alias.
    eu.europa.esig.dss.ws.dto.SignatureValueDTO
    signDigest(eu.europa.esig.dss.ws.dto.DigestDTO digest, String alias)
    This method signs the digest data with the given alias.
  • Method Details

    • getKeys

      @GET @Path("keys") List<eu.europa.esig.dss.ws.server.signing.dto.RemoteKeyEntry> getKeys()
      Retrieves all the available keys (private keys entries) from the token.
      Returns:
      List of encapsulated private keys
    • getKey

      @GET @Path("key/{alias}") eu.europa.esig.dss.ws.server.signing.dto.RemoteKeyEntry getKey(@PathParam("alias") String alias)
      Retrieves a key by its alias
      Parameters:
      alias - the key alias to retrieve
      Returns:
      the RemoteKeyEntry with the given alias
    • sign

      @POST @Path("sign/{alias}/{algo}") eu.europa.esig.dss.ws.dto.SignatureValueDTO sign(eu.europa.esig.dss.ws.dto.ToBeSignedDTO toBeSigned, @PathParam("algo") eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, @PathParam("alias") String alias)
      This method signs the toBeSigned data with the digest digestAlgorithm and the given alias.
      Parameters:
      toBeSigned - The data that need to be signed
      digestAlgorithm - The digest algorithm to be used before signing
      alias - The key alias to be used
      Returns:
      The array of bytes representing the signature value
    • sign

      @POST @Path("sign-with-signature-algo/{alias}/{signature-algo}") eu.europa.esig.dss.ws.dto.SignatureValueDTO sign(eu.europa.esig.dss.ws.dto.ToBeSignedDTO toBeSigned, @PathParam("signature-algo") eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, @PathParam("alias") String alias)
      This method signs the toBeSigned data with the digest digestAlgorithm and the given alias.
      Parameters:
      toBeSigned - The data that need to be signed
      signatureAlgorithm - The signature algorithm to be used for signing
      alias - The key alias to be used
      Returns:
      The array of bytes representing the signature value
    • signDigest

      @POST @Path("sign-digest/{alias}") eu.europa.esig.dss.ws.dto.SignatureValueDTO signDigest(eu.europa.esig.dss.ws.dto.DigestDTO digest, @PathParam("alias") String alias)
      This method signs the digest data with the given alias.
      Parameters:
      digest - The digested data that need to be signed
      alias - The key alias to be used
      Returns:
      the signature value representation with the used algorithm and the binary value
    • signDigest

      @POST @Path("sign-digest-with-signature-algo/{alias}/{signature-algo}") eu.europa.esig.dss.ws.dto.SignatureValueDTO signDigest(eu.europa.esig.dss.ws.dto.DigestDTO digest, @PathParam("signature-algo") eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, @PathParam("alias") String alias)
      This method signs the digest data with a mask mgf and the given alias.
      Parameters:
      digest - The digested data that need to be signed
      signatureAlgorithm - The signature algorithm to be used for signing
      alias - The key alias to be used
      Returns:
      the signature value representation with the used algorithm and the binary value