DefaultSecurityEventTokenSigner Class
The out-of-the-box signer: compact JWS through the Abblix JWT core, with the signing key from the source the host configured.
public sealed class DefaultSecurityEventTokenSigner : Abblix.SecurityEvents.Abstractions.ISecurityEventTokenSignerInheritance System.Object → DefaultSecurityEventTokenSigner
Implements ISecurityEventTokenSigner
Remarks
The key source is asked per signing rather than once, so key rotation on the host's side takes effect on the next token instead of the next restart. The signing algorithm follows the key, and this signer writes it into the header rather than letting the core derive it, so that what was judged against the allowlist is what the token is signed with.
Constructors
DefaultSecurityEventTokenSigner(IJsonWebTokenCreator, Func<CancellationToken,Task<JsonWebKey>>, string[]) Constructor
The out-of-the-box signer: compact JWS through the Abblix JWT core, with the signing key from the source the host configured.
public DefaultSecurityEventTokenSigner(Abblix.Jwt.IJsonWebTokenCreator creator, System.Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<Abblix.Jwt.JsonWebKey>> signingKeySource, string[] allowedAlgorithms);Parameters
creator IJsonWebTokenCreator
The JWT core's token creator.
signingKeySource System.Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<JsonWebKey>>
Supplies the private key each signing uses.
allowedAlgorithms System.String[]
What this deployment will sign with.
Remarks
The key source is asked per signing rather than once, so key rotation on the host's side takes effect on the next token instead of the next restart. The signing algorithm follows the key, and this signer writes it into the header rather than letting the core derive it, so that what was judged against the allowlist is what the token is signed with.
Methods
DefaultSecurityEventTokenSigner.SignAsync(SecurityEventToken, CancellationToken) Method
Signs the SET and returns its compact serialization.
public System.Threading.Tasks.Task<string> SignAsync(Abblix.SecurityEvents.SecurityEventToken token, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
token SecurityEventToken
The SET to sign.
cancellationToken System.Threading.CancellationToken
Cancels key retrieval or remote signing mid-flight.
Implements SignAsync(SecurityEventToken, CancellationToken)
Returns
System.Threading.Tasks.Task<System.String>
The compact JWS (or JWE-wrapped JWS) representation of the SET.