/**
 * return a token created using options.authentication or set on options.token
 *
 * @export
 * @param {IEventsRequestOptions} options
 * @return {*}  {Promise<string>}
 */
export function authenticateRequest(options) {
    const { token, authentication } = options;
    if (authentication) {
        return authentication.getToken(authentication.portal);
    }
    return Promise.resolve(token);
}
//# sourceMappingURL=authenticate-request.js.map