mirror of
https://github.com/hanzoai/openid-client.git
synced 2026-09-24 17:01:10 +00:00
2.0 KiB
2.0 KiB
Function: PrivateKeyJwt()
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.
â–¸ PrivateKeyJwt(clientPrivateKey, options?): ClientAuth
private_key_jwt uses the HTTP request body to send client_id,
client_assertion_type, and client_assertion as
application/x-www-form-urlencoded body parameters. Digital signature is
used for the assertion's authenticity and integrity.
Parameters
| Parameter | Type | Description |
|---|---|---|
clientPrivateKey |
CryptoKey | PrivateKey |
- |
options? |
ModifyAssertionOptions |
- |
Returns
Examples
Usage with a Configuration obtained through discovery
let server!: URL
let key!: client.CryptoKey | client.PrivateKey
let clientId!: string
let clientMetadata!: Partial<client.ClientMetadata> | string | undefined
let config = await client.discovery(
server,
clientId,
clientMetadata,
client.PrivateKeyJwt(key),
)
Usage with a Configuration instance
let server!: client.ServerMetadata
let key!: client.CryptoKey | client.PrivateKey
let clientId!: string
let clientMetadata!: Partial<client.ClientMetadata> | string | undefined
let config = new client.Configuration(
server,
clientId,
clientMetadata,
client.PrivateKeyJwt(key),
)