use of org.apache.airavata.credential.store.credential.impl.certificate.CertificateAuditInfo in project airavata by apache.
the class CredentialReaderImpl method getAuditInfo.
public CertificateAuditInfo getAuditInfo(String gatewayName, String tokenId) throws CredentialStoreException {
Connection connection = getConnection();
CertificateAuditInfo certificateAuditInfo;
try {
CertificateCredential certificateCredential = (CertificateCredential) this.credentialsDAO.getCredential(gatewayName, tokenId, connection);
certificateAuditInfo = new CertificateAuditInfo();
CommunityUser retrievedUser = certificateCredential.getCommunityUser();
certificateAuditInfo.setCommunityUserName(retrievedUser.getUserName());
certificateAuditInfo.setCredentialLifeTime(certificateCredential.getLifeTime());
certificateAuditInfo.setCredentialsRequestedTime(certificateCredential.getCertificateRequestedTime());
certificateAuditInfo.setGatewayName(gatewayName);
certificateAuditInfo.setNotAfter(certificateCredential.getNotAfter());
certificateAuditInfo.setNotBefore(certificateCredential.getNotBefore());
certificateAuditInfo.setPortalUserName(certificateCredential.getPortalUserName());
} finally {
DBUtil.cleanup(connection);
}
return certificateAuditInfo;
}
Aggregations