Module plugin-configuration

January 9, 2025 · View on GitHub

category:public

Source file

Class PluginConfiguration

Defines the configuration for the openid plugin.

Constructors

PluginConfiguration(options)

ParametersTypeDescription
optionsPluginOptionsoptions to configure the plugin

Methods

setLogger(logger) ► PluginConfiguration

modifier: public

Defines the plugin logger.

ParametersTypeDescription
loggerILoggerthe plugin logger
returnPluginConfigurationthe plugin configuration

setLogLevel(logLevel) ► PluginConfiguration

modifier: public

Defines the plugin logging level. 4: DEBUG, 3: INFO, 2: WARN, 1: ERROR, 0: NONE

ParametersTypeDescription
logLevelnumberthe plugin logging level
returnPluginConfigurationthe plugin configuration

setStorage(store) ► PluginConfiguration

modifier: public

Defines the storage for storing user and state.

ParametersTypeDescription
storeStoragethe backend store
returnPluginConfigurationthe plugin configuration

Members

NameTypeDescription
simulationbooleanActivates the simulation mode where the login/logout is only simulated. You can define a related simulationUser.
simulationUserSimulatedUserUser object that defines the connected user when simulation mode is enable.
userIdClaimSelector((profile: UserProfile | {name: string}) => string)Function that defines the profile claim used to represent user identifier.
loginRequiredSelector((errorResponse: ErrorResponse) => boolean)Function that defines the silent login failure analysis to determine that a complete login is required.
redirectsOnClaim((profile: UserProfile) => string)Function that defines the redirect route name based on the presence of specific profile claims.
reconnectPrompt((loginFunction: Function) => void)*Function that defines the reconnection prompt that will be displayed when a new connection is required.
The loginFunction parameter is the function to call when user accepts to reconnect.*
userManagerSettingsUserManagerSettingsConfiguration object of the underlying oidc-client-js library. See https://github.com/IdentityModel/oidc-client-js/wiki for details.
onError((errorResponse: ErrorResponse) => void)Callback function called when the oidc provider returns an error.