Creates an JwtAuthentication object that knows where to get the auth-token and when to refresh it.
The settings for the authentication object.
An object that controls the authentication for the lookups.
Can be used to check the state of deferUpdates.
The number of times this service-instance has aborted a request (typically as a result to starting a new request while the previous is still running and needs to be aborted).
The number of times this service-instance has cancelled a request (as directed from a user cbRequest rejection).
The number of times this service-instance has completed a request (not counting aborted or cancelled requests).
The number of times this service-instance has failed during a request (not counting aborted or cancelled requests).
The number of times this service-instance has started a request.
Decides whether an update should be executed or not. Typically used to temporarily turn off update-execution. When turned back on the second param can be used to indicate whether pending updates should be executed or not.
Turns on or off deferring of updates.
Used to indicate if a pending update is to be executed or skipped when deferring is turned off. The param is ignored for state=true.
Fetches the results from the server.
The query-object that controls which results that are to be returned.
Set to true if you have defined callbacks, but somehow don't want them to be called.
a promise that when resolved returns the data.
Sets up the Request that is to be executed, with headers and auth as needed.
Set to false to not include the auth jwt token in the request headers. Default=true
Call the service, but take into account deferredUpdates.
The query object to create the fetch for.
A delay for when to execute the update, in milliseconds. Defaults to undefined.
Generated using TypeDoc
The JwtAuthentication service is a supporting feature for the other services. Typically used via the SearchClient.constructor and by providing AuthenticationSettings settings in the Settings.authentication property.
The authentication system is based on JWT and needs an end-point to be configured from where it will get its authentication-token. This service will be monitoring the token-value to see if it is either missing or expired. When that happens a new token will be fetched from the end-point. The [[AuthenticationSettings.expiryOverlap]] object controls how long before expiration the new token is to be fetched.