Interface CUserService
- All Known Implementing Classes:
CUserServiceImpl
public interface CUserService
High-level user certificate and keystore operations. These services help retrieving certificates, keystores and other
information related to specific users.
- Author:
- Wojciech Sulejman
-
Method Summary
Modifier and TypeMethodDescriptioncreateCertificate
(DocumentModel user, String userKeyPassword) Generates user certificate and user keys, saves them to a user store, and persists the store in the directory.void
deleteCertificate
(String userID) Deletes user entry from the certificate directory.getCertificate
(String userID) Retrieves a user certificate from the directory.byte[]
Retrieves the public root certificate.getUserCertInfo
(DocumentModel user, String userKeyPassword) Returns simplified textual representation of a certificate's contents.getUserInfo
(DocumentModel userModel) Retrieves a UserInfo object containing information needed for certificate generation.getUserKeystore
(String userID, String userKeyPassword) Retrieves user keystore from the directory.boolean
hasCertificate
(String userID) Checks if the user is present in the certificate directory.
-
Method Details
-
createCertificate
Generates user certificate and user keys, saves them to a user store, and persists the store in the directory.- Throws:
CertException
-
getUserInfo
Retrieves a UserInfo object containing information needed for certificate generation.- Throws:
CertException
-
getUserCertInfo
Returns simplified textual representation of a certificate's contents.- Returns:
- Simple certificate string.
- Throws:
CertException
-
getUserKeystore
Retrieves user keystore from the directory.- Returns:
- User KeyStore object
- Throws:
CertException
-
getCertificate
Retrieves a user certificate from the directory.- Returns:
- certificate document model
-
getRootCertificateData
byte[] getRootCertificateData()Retrieves the public root certificate.- Returns:
- certificate document model
-
hasCertificate
Checks if the user is present in the certificate directory.- Throws:
CertException
-
deleteCertificate
Deletes user entry from the certificate directory.This is a high-level operation. The following containers/entries are removed:
- a certificate directory entry related to the userID
- a keystore (which was saved as a field in the directory entry)
- a private key and a public certificate (which were contained in the keystore)
- Throws:
CertException
-