AuthServiceKeysProviderExtensions Class
Extension helpers for IAuthServiceKeysProvider.
public static class AuthServiceKeysProviderExtensionsInheritance System.Object → AuthServiceKeysProviderExtensions
Methods
AuthServiceKeysProviderExtensions.GetPublishedKeysAsync(this IAuthServiceKeysProvider, ILogger) Method
Builds the public key set published at the JWKS endpoint: the signing public keys marked use=sig
and the server's asymmetric encryption public keys marked use=enc so a client can encrypt a
request object or other inbound JWE to the server (RFC 9101). A symmetric server key has no public half
and is omitted; only sanitized public halves are ever published, never private or secret material.
As a last-resort guard against a misbehaving key provider, any key still carrying private material is
stripped to its public half before it enters the set and a warning is logged: the JWKS endpoint must
never leak a private key, even if an upstream provider mistakenly returns one.
public static System.Threading.Tasks.Task<Abblix.Jwt.JsonWebKey[]> GetPublishedKeysAsync(this Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider provider, Microsoft.Extensions.Logging.ILogger logger);Parameters
provider IAuthServiceKeysProvider
The provider of the service's signing and encryption keys.
logger Microsoft.Extensions.Logging.ILogger
Logger used to warn when a private key is stripped before publication.
Returns
System.Threading.Tasks.Task<JsonWebKey[]>
The signing keys followed by the asymmetric encryption public keys.