@ekoopensource/sdk
Version:
Ekoopensource sdk to connect to the ekoopnsource grids and services
22 lines (21 loc) • 807 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const EkoOpenSourceExceptions_1 = require("./Exceptions/EkoOpenSourceExceptions");
exports.default = {
/**
* Returns true or false if the credentials exist or not
* @param {object} args
* @returns {Boolean} returns true if all the credentials are in place
*/
checkCredentials(args) {
// @ts-ignore
if (!args.hasOwnProperty("clientId")) {
throw new EkoOpenSourceExceptions_1.EkoOpenSourceExceptions("you did not provide the client id");
}
// @ts-ignore
if (!args.hasOwnProperty("clientSecret")) {
throw new EkoOpenSourceExceptions_1.EkoOpenSourceExceptions("you did not provide the client secret");
}
return true;
}
};