UNPKG

@ekoopensource/sdk

Version:

Ekoopensource sdk to connect to the ekoopnsource grids and services

24 lines (20 loc) 664 B
import * as _ from "lodash"; import { EkoOpenSourceExceptions } from "./Exceptions/EkoOpenSourceExceptions"; export 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: object) { // @ts-ignore if (!args.hasOwnProperty("clientId")) { throw new EkoOpenSourceExceptions("you did not provide the client id"); } // @ts-ignore if (!args.hasOwnProperty("clientSecret")) { throw new EkoOpenSourceExceptions("you did not provide the client secret"); } return true; } };