@adobe/pdfservices-node-sdk
Version:
The Adobe PDF Services Node.js SDK provides APIs for creating, combining, exporting and manipulating PDFs.
75 lines • 2.88 kB
JavaScript
;
/*
* Copyright 2024 Adobe
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it. If you have received this file from a source other than Adobe,
* then your use, modification, or distribution of it requires the prior
* written permission of Adobe.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.CSCCredential = void 0;
const CertificateCredentials_1 = require("./CertificateCredentials");
const ValidationUtil_1 = require("../../../internal/util/ValidationUtil");
/**
* Parameters for representing the CSC Provider based credentials as a subtype
* for {@link CertificateCredentials}.
*/
class CSCCredential extends CertificateCredentials_1.CertificateCredentials {
/**
* Constructs a new `CSCCredential` instance.
*
* @param params - The parameters for constructing an instance of `CSCCredential`.
* @param params.providerName - The name of the Trust Service Provider to be used for applying electronic seal.
* Cannot be undefined.
* @param params.credentialId - The digital ID stored with the TSP provider to be used for applying electronic seal.
* Cannot be undefined.
* @param params.pin - The pin associated with the credential ID. Cannot be undefined.
* @param params.authorizationContext - The service authorization data required to communicate with the TSP.
* Cannot be undefined.
*/
constructor(params) {
super();
ValidationUtil_1.ValidationUtil.validateCSCCredential(params);
this._providerName = params.providerName;
this._credentialId = params.credentialId;
this._pin = params.pin;
this._authorizationContext = params.authorizationContext;
}
/**
* Returns the name of the Trust Service Provider to be used for applying electronic seal.
*
* @returns the name of the Trust Service Provider.
*/
get providerName() {
return this._providerName;
}
/**
* Returns the digital ID stored with the TSP provider to be used for applying electronic seal.
*
* @returns the digital ID stored with the TSP provider.
*/
get credentialID() {
return this._credentialId;
}
/**
* Returns the pin associated with the credential ID.
*
* @returns the pin associated with the credential ID.
*/
get pin() {
return this._pin;
}
/**
* Returns the service authorization data required to communicate with the TSP.
*
* @returns the service authorization data required to communicate with the TSP.
*/
get authorizationContext() {
return this._authorizationContext;
}
}
exports.CSCCredential = CSCCredential;
//# sourceMappingURL=CSCCredentials.js.map