Creates an OIDC Provider based on the provided configuration and parameters. The provider will be cached and returned on subsequent calls. Cookie and JWT keys will be stored in an internal storage so they can be re-used over multiple threads. Necessary claims for Solid OIDC interactions will be added. Routes will be updated based on the baseUrl and oidcPath.

Hierarchy

  • IdentityProviderFactory

Implements

Constructors

Properties

adapterFactory: AdapterFactory
baseUrl: string
config: Configuration
credentialStorage: KeyValueStorage<string, ClientCredentials>
errorHandler: ErrorHandler
interactionHandler: InteractionHandler
jwtAlg: "ES256" = 'ES256'
oidcPath: string
provider?: Provider
responseWriter: ResponseWriter
storage: KeyValueStorage<string, unknown>

Methods

  • Creates the route string as required by the oidc-provider library. In case base URL is http://test.com/foo/, oidcPath is /idp and relative is device/auth, this would result in /foo/idp/device/auth.

    Parameters

    • relative: string

    Returns string

  • Gets a provider from the factory. Multiple calls to this function should return providers that produce the same results. This is mostly relevant for signing keys.

    Returns Promise<Provider>

  • Checks if the given token is an access token. The AccessToken interface is not exported so we have to access it like this.

    Parameters

    • token: any

    Returns token is undefined | AccessToken