ClientEncryptionKeyResolver Class
Answers whether a client can be sent a JWT encrypted under the key management algorithm it registered, and with which key: the one question both the formatter that encrypts the JWT and the security profile check that judges the client ahead of it ask.
public sealed class ClientEncryptionKeyResolverInheritance System.Object → ClientEncryptionKeyResolver
Remarks
OpenID Connect Core 1.0 section 10.2 names the key by the algorithm's family. An asymmetric algorithm encrypts to what "MUST be a public key used for encryption published by the recipient in its JWK Set document"; a symmetric one to the key "derived from the client_secret value" (Abblix.Oidc.Server.Features.Tokens.Formatters.ClientSecretEncryptionKey), and to nothing else.
Public, though nothing outside this library needs it, because the formatter that takes it is a public type with a public constructor, which the container requires.
Constructors
ClientEncryptionKeyResolver(ProfiledJwtIssuer, IClientKeysProvider, TimeProvider, EncryptionAlgorithmsProvider, IClientSecretEncryptor) Constructor
Answers whether a client can be sent a JWT encrypted under the key management algorithm it registered, and with which key: the one question both the formatter that encrypts the JWT and the security profile check that judges the client ahead of it ask.
public ClientEncryptionKeyResolver(Abblix.Oidc.Server.Features.Tokens.Formatters.ProfiledJwtIssuer issuer, Abblix.Oidc.Server.Features.ClientInformation.IClientKeysProvider clientKeysProvider, System.TimeProvider timeProvider, Abblix.Jwt.EncryptionAlgorithmsProvider encryptionAlgorithms, Abblix.Oidc.Server.Features.ClientInformation.IClientSecretEncryptor secretEncryptor);Parameters
issuer ProfiledJwtIssuer
Decides whether the host performs an algorithm with a key and the profile admits it.
clientKeysProvider IClientKeysProvider
Supplies the encryption keys the client publishes.
timeProvider System.TimeProvider
Supplies the time a client secret's expiry is judged against.
encryptionAlgorithms EncryptionAlgorithmsProvider
Tells which key types a key management algorithm is carried out with.
secretEncryptor IClientSecretEncryptor
Decrypts a client secret kept encrypted, for the key derived from it.
Remarks
OpenID Connect Core 1.0 section 10.2 names the key by the algorithm's family. An asymmetric algorithm encrypts to what "MUST be a public key used for encryption published by the recipient in its JWK Set document"; a symmetric one to the key "derived from the client_secret value" (Abblix.Oidc.Server.Features.Tokens.Formatters.ClientSecretEncryptionKey), and to nothing else.
Public, though nothing outside this library needs it, because the formatter that takes it is a public type with a public constructor, which the container requires.
Methods
ClientEncryptionKeyResolver.ResolveAsync(TenantDefinition, SecurityProfileRequirements, ClientInfo, string, string) Method
The key a JWT for client is encrypted to under keyManagementAlgorithm, or null where there is none: the first published key that declares the algorithm or none, whose material carries it out, the host performs it with and profile admits; for a symmetric algorithm, the key derived from the client secret, under the same conditions.
public System.Threading.Tasks.Task<Abblix.Jwt.JsonWebKey?> ResolveAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, Abblix.Oidc.Server.Features.ClientInformation.SecurityProfileRequirements profile, Abblix.Oidc.Server.Features.ClientInformation.ClientInfo client, string keyManagementAlgorithm, string contentEncryptionAlgorithm);Parameters
tenant TenantDefinition
The tenant the client is registered at.
profile SecurityProfileRequirements
The controls the client is held to.
client ClientInfo
The client the JWT is addressed to.
keyManagementAlgorithm System.String
The key management algorithm the client registered.
contentEncryptionAlgorithm System.String
The content encryption algorithm the JWT is encrypted with, which fixes the length of a key used directly as the content encryption key.