All Implemented Interfaces:
AutoCloseable

public class Session extends Provider

The Swisscom Signing Service

When signing with this provider, these errors can occur:

When signing with step-up authorization, these errors can also occur.

  • PermissionException: The user canceled the authorization request or failed to enter correct authentication data (password, OTP).

  • Constructor Details

  • Method Details

    • createSignatureForStaticIdentity

      public SignatureConfiguration createSignatureForStaticIdentity(String identity, String name)

      Create a signature configuration for a static certificate.

      Parameters:
      identity -

      The Claimed Identity string as provided by Swisscom: ‹customer name›:‹key identity›

      Example: "ais-90days-trial:static-saphir4-ch"

      name -

      Name of the signer. This parameter is not used for certificate selection, but for the signature appearance and signature description in the PDF only.

      Example: "Signing Service TEST account"

      Returns:
      Throws:
      IllegalArgumentException - if identity is null
      IllegalArgumentException - if name is null
    • createSignatureForOnDemandIdentity

      public SignatureConfiguration createSignatureForOnDemandIdentity(String identity, String distinguishedName, StepUp stepUp)

      Create a signature configuration for an on-demand certificate

      Parameters:
      identity -

      The Claimed Identity string as provided by Swisscom: ‹customer name›:‹key identity›

      Example: "ais-90days-trial:OnDemand-Advanced4"

      distinguishedName -

      The requested distinguished name of the on-demand certificate.

      Example: "cn=Hans Muster,o=ACME,c=CH"

      stepUp - Options for step-up authorization using Mobile ID.
      Returns:
      Throws:
      IllegalArgumentException - if identity is null
      IllegalArgumentException - if distinguishedName is null
    • createTimestamp

      public TimestampConfiguration createTimestamp(String identity)

      Create a time-stamp configuration

      Parameters:
      identity -

      The Claimed Identity string as provided by Swisscom: ‹customer name›

      Example: "ais-90days-trial"

      Returns:
      Throws:
      IllegalArgumentException - if identity is null