panva / openid-client

OAuth 2 / OpenID Connect Client API for JavaScript Runtimes
MIT License
1.83k stars 392 forks source link

Message-Level Encryption support #246

Closed tpimh closed 4 years ago

tpimh commented 4 years ago

Message-Level Encryption is required by some OpenID providers. Here is a brief description of MLE. It doesn't seem to be supported by node-openid-client.

If I'm wrong and it really can support it, a simple example would be very appreciated!

panva commented 4 years ago

Signed and/or encrypted ID Tokens and JWT Userinfo responses are fully supported - all algs and encs JOSE has registered. You just have to set the according IANA registered client metadata and provide jwks the provider will encrypt to.

https://github.com/panva/node-openid-client/blob/master/docs/README.md#new-clientmetadata-jwks-options