Subscribes to an event type.
The event type
The function to subscribe to events of this type
Unsubscribes all listener functions to a single event type or all event types.
The event type, or all event types if not specified
Publishes an event.
The event object to publish
Unsubscribes from an event type.
The event type
The function to unsubscribe from events of this type
Makes a request using the specified options.
The options to use when making the request
HTTP client that includes bearer token injection and refresh. This module also supports authorization for policy protected endpoints.
Example:
return forgerock.HttpClient.request({ url: `https://example.com/protected/resource`, init: { method: 'GET', credentials: 'include', }, authorization: { handleStep: async (step) => { step.getCallbackOfType('PasswordCallback').setPassword(pw); return Promise.resolve(step); }, }, });