Add support for RFC 9068
RFC 9068: JWT Profile for OAuth 2.0 Access Tokens: tools.ietf.org/html/rfc9068
Suppose it would be something similar to: openidconnect::IdTokenClaims. I can begin to draft a PR if the addition seems reasonable.
From only taking a very brief look at how this can be implemented:
There are some helpers and lots of JWK/JWT/... functionality in the openidconnect crate which implement parts of RFC7519. RFC9098 uses it too. One option would be to create a helper crate which both oath2 and openidconnect depend on. Or one could move helpers.rs to oath2, for example.
Suppose @ramosbugs has the final say in this.
Sketched a partial implementation downstream for anyone interested in copying it for their own use:
https://github.com/gibbz00/amigo/blob/experimentation/crates/utils/jwt-access-token/src/token.rs
See https://github.com/ramosbugs/openidconnect-rs/issues/160#issuecomment-2063885944
JWT functionality adds significant complexity that I don't want to add as a maintenance burden to this crate. Instead, it can be built as a separate crate on top of this one and maintained separately, similar to my openidconnect crate.
Aight, ok with that 😊