@adobe/pdfservices-node-sdk
Version:
The Adobe PDF Services Node.js SDK provides APIs for creating, combining, exporting and manipulating PDFs.
51 lines • 1.76 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.CSCAuthContext = void 0;
const ValidationUtil_1 = require("../../../internal/util/ValidationUtil");
/**
* Parameters for representing CSC authorization context.
*/
class CSCAuthContext {
/**
* Constructs a new `CSCAuthContext` instance.
*
* @param params - The parameters for constructing an instance of `CSCAuthContext`.
* @param params.accessToken - The the service access token used to authorize access to the CSC provider
* hosted APIs. Cannot be undefined.
* @param [params.tokenType] - The the type of service access token used to authorize access to the CSC
* provider hosted APIs. Default value is `"Bearer"`.
*/
constructor(params) {
ValidationUtil_1.ValidationUtil.validateCSCAuthContext(params);
this._accessToken = params.accessToken;
this._tokenType = params.tokenType;
}
/**
* Returns the access token required for CSC based services.
*
* @returns CSC Provider access token
*/
get accessToken() {
return this._accessToken;
}
/**
* Returns the type of access token.
*
* @returns token type
*/
get tokenType() {
return this._tokenType;
}
}
exports.CSCAuthContext = CSCAuthContext;
//# sourceMappingURL=CSCAuthContext.js.map