Skip to main content

server

Enumerations

Classes

Interfaces

Type Aliases

AuthPluginInternalConfig

Ƭ AuthPluginInternalConfig: Object

Type declaration

NameType
namestring
override?AuthPluginOverride

Defined in

packages/backend/server/src/auth-plugins/abstract-auth-plugin.ts:5


AuthPluginOnRegisterConfig

Ƭ AuthPluginOnRegisterConfig: Object

Type declaration

NameType
keycloakConfigKeycloakConnectorConfigBase
logger?Logger

Defined in

packages/backend/server/src/auth-plugins/abstract-auth-plugin.ts:10


ClientRole

Ƭ ClientRole<Clients, Roles>: { [client in Clients]: RoleRules<Roles> }

Type parameters

NameType
Clientsextends KeycloakClient = KeycloakClient
Rolesextends KeycloakRole = KeycloakRole

Defined in

packages/backend/server/src/types.ts:246


ClusterConnectorKeys

Ƭ ClusterConnectorKeys: Object

Type declaration

NameType
connectorKeysConnectorKeys
currentStart?number
prevConnectorKeys?ConnectorKeys
prevExpire?number

Defined in

packages/backend/server/src/crypto/cluster-key-provider.ts:23


ClusterJobConfig

Ƭ ClusterJobConfig: Object

Type declaration

NameType
clusterProviderAbstractClusterProvider
jobName?string
requestTimestampnumber
targetChannelstring

Defined in

packages/backend/server/src/cluster/cluster-job.ts:3


ClusterJobMessage

Ƭ ClusterJobMessage: Object

Type declaration

NameType
durationnumber
eventstring
jobName?string
processId?string
remarks?string
timestampnumber

Defined in

packages/backend/server/src/cluster/cluster-job.ts:17


ClusterKeyProviderMsgs

Ƭ ClusterKeyProviderMsgs: PendingJwksUpdateMsg | CancelPendingJwksUpdateMsg | NewJwksAvailableMsg | RequestUpdateSystemJwksMsg | RequestActiveKey

Defined in

packages/backend/server/src/crypto/cluster-key-provider-message-types.ts:37


ClusterMessage

Ƭ ClusterMessage: unknown

Defined in

packages/backend/server/src/cluster/abstract-cluster-provider.ts:21


CombinedRoleRules

Ƭ CombinedRoleRules<Roles, Clients>: RoleRules<Roles> | ClientRole<Clients, Roles> | RoleLocation<Roles>

Type parameters

NameType
Rolesextends KeycloakRole = KeycloakRole
Clientsextends KeycloakClient = KeycloakClient

Defined in

packages/backend/server/src/types.ts:261


ConnectorKeys

Ƭ ConnectorKeys: Object

Type declaration

NameType
kidstring
privateJwkJWK
publicJwkJWK

Defined in

packages/backend/server/src/types.ts:32


CookieOptionsBase

Ƭ CookieOptionsBase<Server>: Server extends fastify ? CookieSerializeOptions : CookieOptions

Type parameters

NameType
Serverextends SupportedServers

Defined in

packages/backend/server/src/types.ts:203


DecorateResponse

Ƭ DecorateResponse: (input: { connectorRequest: ConnectorRequest ; logger: Logger | undefined ; userData: UserData }) => Promise<Record<string, unknown>>

Type declaration

▸ (input): Promise<Record<string, unknown>>

Parameters
NameType
inputObject
input.connectorRequestConnectorRequest
input.loggerLogger | undefined
input.userDataUserData
Returns

Promise<Record<string, unknown>>

Defined in

packages/backend/server/src/auth-plugins/abstract-auth-plugin.ts:15


DecorateUserStatus

Ƭ DecorateUserStatus<UserStatus>: (connectorRequest: ConnectorRequest, logger: Logger | undefined) => Promise<Record<string, UserStatus>>

Type parameters

NameType
UserStatusRecord<string, any>

Type declaration

▸ (connectorRequest, logger): Promise<Record<string, UserStatus>>

Parameters
NameType
connectorRequestConnectorRequest
loggerLogger | undefined
Returns

Promise<Record<string, UserStatus>>

Defined in

packages/backend/server/src/auth-plugins/abstract-auth-plugin.ts:16


HTTPMethod

Ƭ HTTPMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"

Defined in

packages/backend/server/src/types.ts:17


IsUserAuthorized

Ƭ IsUserAuthorized: (connectorRequest: ConnectorRequest, userData: UserData, logger?: Logger) => Promise<boolean>

Type declaration

▸ (connectorRequest, userData, logger?): Promise<boolean>

Parameters
NameType
connectorRequestConnectorRequest
userDataUserData
logger?Logger
Returns

Promise<boolean>

Defined in

packages/backend/server/src/auth-plugins/abstract-auth-plugin.ts:17


KcAccessJWT

Ƭ KcAccessJWT: OidcIdToken & OidcStandardClaims & KcAccessClaims

Defined in

packages/backend/server/src/types.ts:271


KeyProvider

Ƭ KeyProvider: (keyProviderConfig: KeyProviderConfig) => Promise<AbstractKeyProvider>

Type declaration

▸ (keyProviderConfig): Promise<AbstractKeyProvider>

Parameters
NameType
keyProviderConfigKeyProviderConfig
Returns

Promise<AbstractKeyProvider>

Defined in

packages/backend/server/src/types.ts:145


KeyProviderConfig

Ƭ KeyProviderConfig: Object

Type declaration

NameType
clusterProvider?AbstractClusterProvider
pinoLogger?Logger

Defined in

packages/backend/server/src/crypto/abstract-key-provider.ts:12


KeycloakClient

Ƭ KeycloakClient: string

Dev note - Unable to limit the number of properties declared when using a dynamic key in typescript Even though typescript may not throw errors, the runtime script still may.

Defined in

packages/backend/server/src/types.ts:230


KeycloakConnectorConfigCustom

Ƭ KeycloakConnectorConfigCustom: Omit<Partial<KeycloakConnectorConfigBase>, "oidcClientMetadata"> & Pick<KeycloakConnectorConfigBase, "authServerUrl" | "realm" | "serverOrigin"> & { oidcClientMetadata?: Partial<ClientMetadata> }

Defined in

packages/backend/server/src/types.ts:40


KeycloakConnectorExposedProperties

Ƭ KeycloakConnectorExposedProperties: ReturnType<KeycloakConnector<any>["getExposed"]>

Defined in

packages/backend/server/src/types.ts:38


KeycloakRole

Ƭ KeycloakRole: string

Defined in

packages/backend/server/src/types.ts:231


KeycloakRouteConfig

Ƭ KeycloakRouteConfig<Roles>: RouteConfigRoles<Roles> & RouteConfigBase

Type parameters

NameType
Rolesextends KeycloakRole = KeycloakRole

Defined in

packages/backend/server/src/types.ts:211


KeycloakRouteConfigFastify

Ƭ KeycloakRouteConfigFastify: KeycloakRouteConfig & { bypassAllChecks?: boolean }

Defined in

packages/backend/server/src/adapter/fastify-types.ts:31


KeycloakRouteConfigOrRoles

Ƭ KeycloakRouteConfigOrRoles: KeycloakRouteConfig | RoleRules | undefined | false

Defined in

packages/backend/server/src/types.ts:210


Listener

Ƭ Listener<R, A>: (...args: A) => R

Type parameters

NameType
Rvoid
Aextends any[] | [] = any[]

Type declaration

▸ (...args): R

Parameters
NameType
...argsA
Returns

R

Defined in

packages/backend/server/src/types.ts:147


PluginDecorators

Ƭ PluginDecorators: Record<string, unknown>

Defined in

packages/backend/server/src/types.ts:156


RefreshTokenSet

Ƭ RefreshTokenSet: TokenSetParameters & Required<Pick<TokenSetParameters, "access_token" | "refresh_token">> & { accessToken: KcAccessJWT }

Defined in

packages/backend/server/src/types.ts:273


RefreshTokenSetResult

Ƭ RefreshTokenSetResult: Object

Type declaration

NameType
refreshTokenSetRefreshTokenSet
shouldUpdateCookiesboolean

Defined in

packages/backend/server/src/types.ts:277


ReqCookies

Ƭ ReqCookies: Object

Index signature

▪ [cookieName: string]: string | undefined

Defined in

packages/backend/server/src/types.ts:154


RequiredRoles

Ƭ RequiredRoles<Roles, Clients>: CombinedRoleRules<Roles, Clients> | CombinedRoleRules<Roles, Clients>[]

Type parameters

NameType
Rolesextends KeycloakRole = KeycloakRole
Clientsextends KeycloakClient = KeycloakClient

Defined in

packages/backend/server/src/types.ts:266


RoleLocation

Ƭ RoleLocation<Roles, Clients>: Object

Type parameters

NameType
Rolesextends KeycloakRole = KeycloakRole
Clientsextends KeycloakClient = KeycloakClient

Type declaration

NameType
REALM_ACCESS?RoleRules<Roles>
RESOURCE_ACCESS?ClientRole<Clients, Roles>

Defined in

packages/backend/server/src/types.ts:253


RoleRules

Ƭ RoleRules<Roles>: RoleRule<Roles>[]

Type parameters

NameType
Rolesextends KeycloakRole = KeycloakRole

Defined in

packages/backend/server/src/types.ts:242


SubscriberListener

Ƭ SubscriberListener: Listener<Promise<void> | void, [ClusterMessage, SenderId]>

Defined in

packages/backend/server/src/cluster/abstract-cluster-provider.ts:35


TokenCacheConfig

Ƭ TokenCacheConfig: CacheAdapterConfig & { oidcClient: BaseClient }

Defined in

packages/backend/server/src/cache-adapters/token-cache.ts:10


TokenCacheProvider

Ƭ TokenCacheProvider: (...args: ConstructorParameters<typeof TokenCache>) => Promise<TokenCache>

Type declaration

▸ (...args): Promise<TokenCache>

Parameters
NameType
...argsConstructorParameters<typeof TokenCache>
Returns

Promise<TokenCache>

Defined in

packages/backend/server/src/cache-adapters/token-cache.ts:14


UserInfoCacheConfig

Ƭ UserInfoCacheConfig: CacheAdapterConfig & { oidcClient: BaseClient }

Defined in

packages/backend/server/src/cache-adapters/user-info-cache.ts:10

Functions

clusterKeyProvider

clusterKeyProvider(keyProviderConfig): Promise<AbstractKeyProvider>

Parameters

NameType
keyProviderConfigKeyProviderConfig

Returns

Promise<AbstractKeyProvider>

Defined in

packages/backend/server/src/types.ts:145


keycloakConnectorExpress

keycloakConnectorExpress(app, customConfig): Promise<{ config: KeycloakConnectorConfigBase ; registerAuthPlugin: (plugin: AbstractAuthPlugin) => Promise<undefined> }>

Parameters

NameType
appExpress
customConfigKeycloakConnectorConfigCustom

Returns

Promise<{ config: KeycloakConnectorConfigBase ; registerAuthPlugin: (plugin: AbstractAuthPlugin) => Promise<undefined> }>

Defined in

packages/backend/server/src/adapter/keycloak-connector-express.ts:6


keycloakConnectorFastify

keycloakConnectorFastify(encapsulate?): FastifyPluginAsync<KeycloakConnectorConfigCustom>

Parameters

NameTypeDefault value
encapsulatebooleanfalse

Returns

FastifyPluginAsync<KeycloakConnectorConfigCustom>

Defined in

packages/backend/server/src/adapter/keycloak-connector-fastify.ts:71


lock

lock(routeConfigOrRoles?): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

Parameters

NameType
routeConfigOrRoles?KeycloakRouteConfigOrRoles

Returns

RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

Defined in

packages/backend/server/src/adapter/express-adapter.ts:240


promiseWait

promiseWait<T>(promise, waitUntilMs): Promise<T>

Waits until a specified unix timestamp, throws a WaitTimeoutError if expiry time is reached

Type parameters

Name
T

Parameters

NameType
promisePromise<T>
waitUntilMsnumber

Returns

Promise<T>

Throws

Error

Defined in

packages/backend/server/src/helpers/utils.ts:9


promiseWaitTimeout

promiseWaitTimeout<T>(promise, timeoutMs): Promise<T>

Type parameters

Name
T

Parameters

NameType
promisePromise<T>
timeoutMsnumber

Returns

Promise<T>

Defined in

packages/backend/server/src/helpers/utils.ts:30


sleep

sleep(ms, extraVariability?, setNodeTimeout?): Promise<true>

Parameters

NameType
msnumber
extraVariability?number
setNodeTimeout?(nodeTimeout: Timeout) => void

Returns

Promise<true>

Defined in

packages/backend/server/src/helpers/utils.ts:45


standaloneKeyProvider

standaloneKeyProvider(keyProviderConfig): Promise<AbstractKeyProvider>

Parameters

NameType
keyProviderConfigKeyProviderConfig

Returns

Promise<AbstractKeyProvider>

Defined in

packages/backend/server/src/types.ts:145


ttlFromExpiration

ttlFromExpiration(expiration): undefined | number

Parameters

NameType
expirationundefined | number

Returns

undefined | number

Defined in

packages/backend/server/src/helpers/utils.ts:35