AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our technical support periods. Find the supported versions here.
About the Credential Service
A credential contains your private key information needed for signing or identifying documents. A certificate is public key information that you configure for trust. AEM Forms uses certificates and credentials for several purposes:
You can programmatically interact with the Credential service using the Trust Manager Java API. You can perform the following tasks:
You can also import and delete certificates by using administration console. (See administration help.)
You can programmatically import a credential into AEM Forms by using the Trust Manager API. For example, you can import a credential used to sign a PDF document. (See Digitally Signing PDF Documents).
When importing a credential, you specify an alias for the credential. The alias is used to perform a Forms operation that requires a credential. Once imported, a credential can be viewed in administration console, as shown in the following illustration. Notice that the alias for the credential is Secure.
You cannot import a credential into AEM Forms using web services.
To import a credential into AEM Forms, perform the following steps:
Include project files
Include necessary files into your development project. If you are creating a client application using Java, then include the necessary JAR files. If you are using web services, then make sure that you include the proxy files.
The following JAR files must be added to your project’s classpath:
For information about the location of these JAR files, see Including AEM Forms Java library files.
Create a credential service client
Before you can programmatically import a credential into AEM Forms, create a credential service client. For information, see Setting connection properties.
Reference the credential
Reference a credential that you want to import into AEM Forms. The quick start associated with this section references a P12 file located in the file system.
Perform the import operation
After you reference the credential, import the credential into AEM Forms. If the credential is not successfully imported, an exception is thrown. When importing a credential, you specify an alias for the credential.
See also
Import credentials using the Java API
Including AEM Forms Java library files
Credential Service API Quick Starts
Deleting Credentials by using the Trust Manager API
Import a credential into AEM Forms by using the Trust Manager API (Java):
Include project files
Include client JAR files, such as adobe-truststore-client.jar, in your Java project’s class path.
Create a credential service client
ServiceClientFactory
object that contains connection properties.CredentialServiceClient
object by using its constructor and passing the ServiceClientFactory
object.Reference the credential
java.io.FileInputStream
object by using its constructor. Pass a string value that specifies the location of the credential.com.adobe.idp.Document
object that stores the credential by using the com.adobe.idp.Document
constructor. Pass the java.io.FileInputStream
object that contains the credential to the constructor.Perform the import operation
Create a string array that holds one element. Assign the value truststore.usage.type.sign
to the element.
Invoke the CredentialServiceClient
object’s importCredential
method and pass the following values:
com.adobe.idp.Document
instance that stores the credential.truststore.usage.type.sign
. To import a Reader Extension credential, specify truststore.usage.type.lcre
.See also
Importing Credentials by using the Trust Manager API
Quick Start (SOAP mode): Importing credentials using the Java API
Including AEM Forms Java library files
You can programmatically delete a credential by using the Trust Manager API. When deleting a credential, you specify an alias that corresponds to the credential. Once deleted, a credential cannot be used to perform an operation.
You cannot delete a credential into AEM Forms using web services.
To delete a credential, perform the following steps:
Include project files
Include necessary files into your development project. If you are creating a client application using Java, then include the necessary JAR files. The following JAR files must be added to your project’s classpath:
For information about the location of these JAR files, see Including AEM Forms Java library files.
Create a credential service client
Before you can programmatically delete a credential, create a Data Integration service client. When creating a service client, you define connection settings that are required to invoke a service. For information, see Setting connection properties.
Perform the delete operation
To delete a credential, specify the alias that corresponds to the credential. If you specify an alias that does not exist, an exception is thrown.
See also
Import credentials using the Java API
Including AEM Forms Java library files
Import credentials using the Java API
Delete a credential from AEM Forms by using the Trust Manager API (Java):
Include project files
Include client JAR files, such as adobe-truststore-client.jar, in your Java project’s class path.
Create a credential service client
ServiceClientFactory
object that contains connection properties.CredentialServiceClient
object by using its constructor and passing the ServiceClientFactory
object.Perform the delete operation
Invoke the CredentialServiceClient
object’s deleteCredential
method and pass a string value that specifies the alias value.
See also
Deleting Credentials by using the Trust Manager API
Quick Start (SOAP mode): Deleting credentials using the Java API
Including AEM Forms Java library files