Class ClientAssertionMinter
- Namespace
- MailFathom.Common.ClientAssertions
- Assembly
- MailFathom.Common.dll
Produces the assertion a client presents, signed with the private half of its key pair.
public static class ClientAssertionMinter
- Inheritance
-
ClientAssertionMinter
- Inherited Members
Remarks
One assertion per request, minted and discarded. There is nothing to cache and nothing to renew: the credential is derived from a key the client already holds, so making a second one costs one signature and removes every question about what a stored copy of the first one would still be good for.
The document is written directly rather than through a token library. What a JSON Web Token is here is fully stated by ClientAssertion — three claims, one declared type, and an algorithm that follows from the key — so building it costs a few lines, and the command that carries it ships as one trimmed binary that has no reason to bring a token stack along for them.
Methods
- Mint(AsymmetricAlgorithm, string, DateTimeOffset)
Mints one assertion for one surface.