- this.logger.error(_scope, 'redeem profile code request failed', { error: e, url: urlObj.href });
- return;
+ this.logger.error(_scope, 'introspect token request failed', { error: e, url: introspectionUrlObj.href });
+ throw e;
+ }
+ }
+
+
+ /**
+ * Attempt to deliver a ticket to an endpoint.
+ * N.B. does not absorb errors
+ * @param {URL} ticketEndpointUrlObj
+ * @param {URL} resourceUrlObj
+ * @param {URL} subjectUrlObj
+ * @param {String} ticket
+ * @returns {Promise<AxiosResponse>}
+ */
+ async deliverTicket(ticketEndpointUrlObj, resourceUrlObj, subjectUrlObj, ticket) {
+ const _scope = _fileScope('deliverTicket');
+
+ try {
+ const ticketConfig = {
+ method: 'POST',
+ url: ticketEndpointUrlObj,
+ form: {
+ ticket,
+ resource: resourceUrlObj.href,
+ subject: subjectUrlObj.href,
+ },
+ };
+ return await this.got(ticketConfig);
+ } catch (e) {
+ this.logger.error(_scope, 'ticket delivery request failed', { error: e, url: ticketEndpointUrlObj.href });
+ throw e;