search-client
Version:
Javascript library for executing searches in the Haive search-index via the SearchManager REST interface.
117 lines (116 loc) • 3.56 kB
TypeScript
import { BaseSettings, IBaseSettings } from '../Common/BaseSettings';
import { AuthenticationTriggers } from './AuthenticationTriggers';
export interface IAuthenticationSettings extends IBaseSettings<any> {
/**
* Sets authentication type - jwt or oidc.
*/
type?: string;
/**
* This is the token, if you need to set an initial value (i.e. if you already have the token)
*/
token?: string;
/**
* The trigger-settings for when a new auth-token is to be requested.
*/
triggers?: AuthenticationTriggers;
/**
* This is the path to the value returned by the authentication-call.
* Should be a name-based lookup array, pointing to where the resulting auth-token is to be found.
*/
tokenPath?: string[];
/**
* OpenId Connect specific settings
*/
/**
* Sets id of the client registered in identity server
*/
clientId?: string;
/**
* Sets response type which describes response type to be returned by identity server
*/
responseType?: string;
/**
* Sets response mode which describes mode of returning data by identity server
*/
responseMode?: string;
/**
* Sets url for redirect after silent token renew operation
*/
silentRedirectUri?: string;
/**
* Sets url for redirect after login operation
*/
redirectUri?: string;
/**
* Sets url for redirect after logout operation
*/
postLogoutRedirectUri?: string;
/**
* Sets list of scopes requested by client.
*/
scope?: string;
/**
* Enables logging of OpenId Connect client.
*/
enableLogging?: boolean;
}
/**
* These are all the settings that can affect the use of jwt authentication in the search-client.
*/
export declare class AuthenticationSettings extends BaseSettings<any> {
/**
* Sets authentication type - jwt or oidc.
*/
type?: string;
/**
* This is the token, if you need to set an initial value (i.e. if you already have the token)
* Default: Undefined
*/
token?: string;
/**
* This is the path to the value returned by the authentication-call.
* Should be a name-based lookup array, pointing to where the resulting auth-token is to be found.
* Default: ["jwtToken"]
*/
tokenPath?: string[];
/**
* The trigger-settings for when a new auth-token is to be requested.
*/
triggers: AuthenticationTriggers;
/**
* OpenId Connect specific settings
*/
/**
* Sets id of the client registered in identity server
*/
clientId?: string;
/**
* Sets response type which describes response type to be returned by identity server
*/
responseType?: string;
/**
* Sets url for redirect after silent token renew operation
*/
silentRedirectUri?: string;
/**
* Sets url for redirect after login operation
*/
redirectUri?: string;
/**
* Sets url for redirect after logout operation
*/
postLogoutRedirectUri?: string;
/**
* Sets list of scopes requested by client.
*/
scope?: string;
/**
* Enables logging of OpenId Connect client.
*/
enableLogging?: boolean;
/**
* Creates an AuthenticationSettings object for you, based on AuthenticationSettings defaults and the overrides provided as a param.
* @param settings - The settings defined here will override the default AuthenticationSettings.
*/
constructor(settings: IAuthenticationSettings | string);
}