The 4.0 release replaces several generic type parameters with associated types to reduce redundancy and improve type safety.
JWT Traits
JsonWebKey no longer uses generic parameters for signing algorithms or key types. Instead, it uses:
type KeyUse: JsonWebKeyUse;type SigningAlgorithm: JwsSigningAlgorithm;
JwsSigningAlgorithm now uses:
type KeyType: JsonWebKeyType;
Token Responses
In OAuth2TokenResponse and TokenIntrospectionResponse, the generic TT: TokenType parameter has been replaced with an associated type:
Note: If you provide custom implementations of TokenResponse or TokenIntrospectionResponse, you must update them to use the associated type instead of the generic parameter.