server
Enumerations
- AuthPluginOverride
- AzpOptions
- BaseClusterEvents
- ClientSearch
- ClusterJobEvents
- RoleConfigurationStyle
- RoleLocations
- StateOptions
- SupportedServers
- VerifiableJwtTokenTypes
Classes
- AbstractAuthPlugin
- AbstractClusterProvider
- AbstractKeyProvider
- AuthPluginManager
- ClusterJob
- ClusterKeyProvider
- ExpressAdapter
- FastifyAdapter
- GenericAuthPlugin
- TokenCache
- UserInfoCache
- WaitTimeoutError
Interfaces
- CancelPendingJwksUpdateMsg
- ClusterConfig
- ConnectorRequest
- ConnectorResponse
- CookieParams
- GenericAuthConfig
- KeycloakConnectorConfigBase
- KeycloakConnectorInternalConfiguration
- LockOptions
- NewJwksAvailableMsg
- PendingJwksUpdateMsg
- RequestActiveKey
- RequestUpdateSystemJwksMsg
- ServerActiveKey
- UserData
- UserDataResponse
Type Aliases
AuthPluginInternalConfig
Ƭ AuthPluginInternalConfig: Object
Type declaration
Name | Type |
---|---|
name | string |
override? | AuthPluginOverride |
Defined in
packages/backend/server/src/auth-plugins/abstract-auth-plugin.ts:5
AuthPluginOnRegisterConfig
Ƭ AuthPluginOnRegisterConfig: Object
Type declaration
Name | Type |
---|---|
keycloakConfig | KeycloakConnectorConfigBase |
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
Name | Type |
---|---|
Clients | extends KeycloakClient = KeycloakClient |
Roles | extends KeycloakRole = KeycloakRole |
Defined in
packages/backend/server/src/types.ts:280
ClusterConnectorKeys
Ƭ ClusterConnectorKeys: Object
Type declaration
Name | Type |
---|---|
connectorKeys | ConnectorKeys |
currentStart? | number |
prevConnectorKeys? | ConnectorKeys |
prevExpire? | number |
Defined in
packages/backend/server/src/crypto/cluster-key-provider.ts:23
ClusterJobConfig
Ƭ ClusterJobConfig: Object
Type declaration
Name | Type |
---|---|
clusterProvider | AbstractClusterProvider |
jobName? | string |
requestTimestamp | number |
targetChannel | string |
Defined in
packages/backend/server/src/cluster/cluster-job.ts:3
ClusterJobMessage
Ƭ ClusterJobMessage: Object
Type declaration
Name | Type |
---|---|
duration | number |
event | string |
jobName? | string |
processId? | string |
remarks? | string |
timestamp | number |
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
Name | Type |
---|---|
Roles | extends KeycloakRole = KeycloakRole |
Clients | extends KeycloakClient = KeycloakClient |
Defined in
packages/backend/server/src/types.ts:295
ConnectorKeys
Ƭ ConnectorKeys: Object
Type declaration
Name | Type |
---|---|
kid | string |
privateJwk | JWK |
publicJwk | JWK |
Defined in
packages/backend/server/src/types.ts:34
CookieOptionsBase
Ƭ CookieOptionsBase<Server
>: Server
extends fastify
? CookieSerializeOptions
: CookieOptions
Type parameters
Name | Type |
---|---|
Server | extends SupportedServers |
Defined in
packages/backend/server/src/types.ts:237
DecorateResponse
Ƭ DecorateResponse: (input
: { connectorRequest
: ConnectorRequest
; logger
: Logger
| undefined
; userData
: UserData
}) => Promise
<Record
<string
, unknown
>>
Type declaration
▸ (input
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
input | Object |
input.connectorRequest | ConnectorRequest |
input.logger | Logger | undefined |
input.userData | UserData |
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
Name | Type |
---|---|
UserStatus | Record <string , any > |
Type declaration
▸ (connectorRequest
, logger
): Promise
<Record
<string
, UserStatus
>>
Parameters
Name | Type |
---|---|
connectorRequest | ConnectorRequest |
logger | Logger | undefined |
Returns
Promise
<Record
<string
, UserStatus
>>
Defined in
packages/backend/server/src/auth-plugins/abstract-auth-plugin.ts:16
DecorateUserStatusBackend
Ƭ DecorateUserStatusBackend<UserStatus
>: (...args
: Parameters
<DecorateUserStatus
<UserStatus
>>) => Promise
<UserStatus
>
Type parameters
Name | Type |
---|---|
UserStatus | Record <string , any > |
Type declaration
▸ (...args
): Promise
<UserStatus
>
Parameters
Name | Type |
---|---|
...args | Parameters <DecorateUserStatus <UserStatus >> |
Returns
Promise
<UserStatus
>
Defined in
packages/backend/server/src/auth-plugins/abstract-auth-plugin.ts:17
ErrorResponseHandler
Ƭ ErrorResponseHandler: (statusCode
: number
) => ConnectorResponse
<any
> | undefined
Type declaration
▸ (statusCode
): ConnectorResponse
<any
> | undefined
Parameters
Name | Type |
---|---|
statusCode | number |
Returns
ConnectorResponse
<any
> | undefined
Defined in
packages/backend/server/src/types.ts:177
HTTPMethod
Ƭ HTTPMethod: "GET"
| "POST"
| "PUT"
| "PATCH"
| "DELETE"
| "OPTIONS"
| "HEAD"
Defined in
packages/backend/server/src/types.ts:19
IsUserAuthorized
Ƭ IsUserAuthorized: (connectorRequest
: ConnectorRequest
, userData
: UserData
, logger?
: Logger
) => Promise
<boolean
>
Type declaration
▸ (connectorRequest
, userData
, logger?
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
connectorRequest | ConnectorRequest |
userData | UserData |
logger? | Logger |
Returns
Promise
<boolean
>
Defined in
packages/backend/server/src/auth-plugins/abstract-auth-plugin.ts:18
KcAccessJWT
Ƭ KcAccessJWT: OidcIdToken
& OidcStandardClaims
& KcAccessClaims
Defined in
packages/backend/server/src/types.ts:305
KeyProvider
Ƭ KeyProvider: (keyProviderConfig
: KeyProviderConfig
) => Promise
<AbstractKeyProvider
>
Type declaration
▸ (keyProviderConfig
): Promise
<AbstractKeyProvider
>
Parameters
Name | Type |
---|---|
keyProviderConfig | KeyProviderConfig |
Returns
Promise
<AbstractKeyProvider
>
Defined in
packages/backend/server/src/types.ts:179
KeyProviderConfig
Ƭ KeyProviderConfig: Object
Type declaration
Name | Type |
---|---|
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:264
KeycloakConnectorConfigCustom
Ƭ KeycloakConnectorConfigCustom: Omit
<Partial
<KeycloakConnectorConfigBase
>, "oidcClientMetadata"
> & Pick
<KeycloakConnectorConfigBase
, "authServerUrl"
| "realm"
| "serverOrigin"
> & { oidcClientMetadata?
: Partial
<ClientMetadata
> }
Defined in
packages/backend/server/src/types.ts:42
KeycloakConnectorExposedProperties
Ƭ KeycloakConnectorExposedProperties: ReturnType
<KeycloakConnector
<any
>["getExposed"
]>
Defined in
packages/backend/server/src/types.ts:40
KeycloakRole
Ƭ KeycloakRole: string
Defined in
packages/backend/server/src/types.ts:265
KeycloakRouteConfig
Ƭ KeycloakRouteConfig<Roles
>: RouteConfigRoles
<Roles
> & RouteConfigBase
Type parameters
Name | Type |
---|---|
Roles | extends KeycloakRole = KeycloakRole |
Defined in
packages/backend/server/src/types.ts:245
KeycloakRouteConfigFastify
Ƭ KeycloakRouteConfigFastify: KeycloakRouteConfig
& { bypassAllChecks?
: boolean
}
Defined in
packages/backend/server/src/adapter/fastify-types.ts:32
KeycloakRouteConfigOrRoles
Ƭ KeycloakRouteConfigOrRoles: KeycloakRouteConfig
| RoleRules
| undefined
| false
Defined in
packages/backend/server/src/types.ts:244
Listener
Ƭ Listener<R
, A
>: (...args
: A
) => R
Type parameters
Name | Type |
---|---|
R | void |
A | extends any [] | [] = any [] |
Type declaration
▸ (...args
): R
Parameters
Name | Type |
---|---|
...args | A |
Returns
R
Defined in
packages/backend/server/src/types.ts:181
PluginDecorators
Ƭ PluginDecorators: Record
<string
, unknown
>
Defined in
packages/backend/server/src/types.ts:190
RefreshTokenSet
Ƭ RefreshTokenSet: TokenSetParameters
& Required
<Pick
<TokenSetParameters
, "access_token"
| "refresh_token"
>> & { accessToken
: KcAccessJWT
}
Defined in
packages/backend/server/src/types.ts:307
RefreshTokenSetResult
Ƭ RefreshTokenSetResult: Object
Type declaration
Name | Type |
---|---|
refreshTokenSet | RefreshTokenSet |
shouldUpdateCookies | boolean |
Defined in
packages/backend/server/src/types.ts:311
ReqCookies
Ƭ ReqCookies: Object
Index signature
▪ [cookieName: string
]: string
| undefined
Defined in
packages/backend/server/src/types.ts:188
RequiredRoles
Ƭ RequiredRoles<Roles
, Clients
>: CombinedRoleRules
<Roles
, Clients
> | CombinedRoleRules
<Roles
, Clients
>[]
Type parameters
Name | Type |
---|---|
Roles | extends KeycloakRole = KeycloakRole |
Clients | extends KeycloakClient = KeycloakClient |
Defined in
packages/backend/server/src/types.ts:300
RoleLocation
Ƭ RoleLocation<Roles
, Clients
>: Object
Type parameters
Name | Type |
---|---|
Roles | extends KeycloakRole = KeycloakRole |
Clients | extends KeycloakClient = KeycloakClient |
Type declaration
Name | Type |
---|---|
REALM_ACCESS? | RoleRules <Roles > |
RESOURCE_ACCESS? | ClientRole <Clients , Roles > |
Defined in
packages/backend/server/src/types.ts:287
RoleRules
Ƭ RoleRules<Roles
>: RoleRule
<Roles
>[]
Type parameters
Name | Type |
---|---|
Roles | extends KeycloakRole = KeycloakRole |
Defined in
packages/backend/server/src/types.ts:276
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
Name | Type |
---|---|
...args | ConstructorParameters <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
Name | Type |
---|---|
keyProviderConfig | KeyProviderConfig |
Returns
Promise
<AbstractKeyProvider
>
Defined in
packages/backend/server/src/types.ts:179
genericAuthExpress
▸ genericAuthExpress(...args
): Promise
<>
Parameters
Name | Type |
---|---|
...args | [app: Express, registerAuthPlugin: Function, config: GenericAuthConfig] |
Returns
Promise
<>
Defined in
packages/backend/server/src/auth-plugins/generic/express.ts:16
genericAuthFastify
▸ genericAuthFastify(instance
, opts
): Promise
<void
>
FastifyPluginAsync
Fastify allows the user to extend its functionalities with plugins. A plugin can be a set of routes, a server decorator or whatever. To activate plugins, use the fastify.register()
method.
Parameters
Name | Type |
---|---|
instance | FastifyInstance <RawServerDefault , IncomingMessage , ServerResponse <IncomingMessage >, FastifyBaseLogger , FastifyTypeProviderDefault > |
opts | GenericAuthConfig |
Returns
Promise
<void
>
Defined in
node_modules/fastify/types/plugin.d.ts:34
keycloakConnectorExpress
▸ keycloakConnectorExpress(app
, customConfig
): Promise
<{ config
: KeycloakConnectorConfigBase
; registerAuthPlugin
: (plugin
: AbstractAuthPlugin
) => Promise
<undefined
> }>
Parameters
Name | Type |
---|---|
app | Express |
customConfig | KeycloakConnectorConfigCustom |
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
Name | Type | Default value |
---|---|---|
encapsulate | boolean | false |
Returns
FastifyPluginAsync
<KeycloakConnectorConfigCustom
>
Defined in
packages/backend/server/src/adapter/keycloak-connector-fastify.ts:75
lock
▸ lock(routeConfigOrRoles?
): RequestHandler
<ParamsDictionary
, any
, any
, ParsedQs
, Record
<string
, any
>>
Parameters
Name | Type |
---|---|
routeConfigOrRoles? | KeycloakRouteConfigOrRoles |
Returns
RequestHandler
<ParamsDictionary
, any
, any
, ParsedQs
, Record
<string
, any
>>
Defined in
packages/backend/server/src/adapter/express-adapter.ts:246
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
Name | Type |
---|---|
promise | Promise <T > |
waitUntilMs | number |
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
Name | Type |
---|---|
promise | Promise <T > |
timeoutMs | number |
Returns
Promise
<T
>
Defined in
packages/backend/server/src/helpers/utils.ts:30
sleep
▸ sleep(ms
, extraVariability?
, setNodeTimeout?
): Promise
<true
>
Parameters
Name | Type |
---|---|
ms | number |
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
Name | Type |
---|---|
keyProviderConfig | KeyProviderConfig |
Returns
Promise
<AbstractKeyProvider
>
Defined in
packages/backend/server/src/types.ts:179
ttlFromExpiration
▸ ttlFromExpiration(expiration
): undefined
| number
Parameters
Name | Type |
---|---|
expiration | undefined | number |
Returns
undefined
| number