Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 2.46 KB

Configuration.md

File metadata and controls

67 lines (45 loc) · 2.46 KB

Class: Configuration

💗 Help the project

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.


Configuration is an abstraction over the OAuth 2.0 Authorization Server metadata and OAuth 2.0 Client metadata

Configuration instances are obtained either through

Examples

(RECOMMENDED) Setting up a Configuration with a Server Metadata discovery step

let server!: URL
let clientId!: string
let clientSecret!: string | undefined

let config = await client.discovery(server, clientId, clientSecret)

Setting up a Configuration with a constructor

let server!: client.ServerMetadata
let clientId!: string
let clientSecret!: string | undefined

let config = new client.Configuration(server, clientId, clientSecret)

Implements

Constructors

new Configuration()

new Configuration(server, clientId, metadata?, clientAuthentication?): Configuration

Parameters

Parameter Type Description
server ServerMetadata Authorization Server Metadata
clientId string Client Identifier at the Authorization Server
metadata? string | Partial<ClientMetadata> Client Metadata, when a string is passed in it is a shorthand for passing just ClientMetadata.client_secret.
clientAuthentication? ClientAuth Implementation of the Client's Authentication Method at the Authorization Server.

Returns

Configuration